Skip to content

Commit

Permalink
Lint code with ESLint and Prettier
Browse files Browse the repository at this point in the history
Triggered by 846bc2a on branch refs/heads/issue-545
  • Loading branch information
CarolineDenis authored and github-actions[bot] committed Apr 22, 2024
1 parent 846bc2a commit ffa931c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ export function RecordSelectorFromIds<SCHEMA extends AnySchema>({
</div>
)}
isDependent={isDependent}
isInRecordSet={!isNewRecordSet}
isLoading={isLoading || isExternalLoading}
isSubForm={false}
resource={resource}
Expand All @@ -249,7 +250,6 @@ export function RecordSelectorFromIds<SCHEMA extends AnySchema>({
: undefined
}
onSaved={(): void => handleSaved(resource!)}
isInRecordSet={!isNewRecordSet}
/>

{dialogs}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ function RecordSet<SCHEMA extends AnySchema>({
fromBulkCarry: boolean = false
): Promise<void> {
if (fromBulkCarry)
await recordSet.set('name', `Batch ${ids[0]} - ${ids[ids.length - 1]}`);
await recordSet.set('name', `Batch ${ids[0]} - ${ids.at(-1)}`);
await recordSet.save();
await addIdsToRecordSet(ids);
navigate(`/specify/record-set/${recordSet.id}/`);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ export function ResourceView<SCHEMA extends AnySchema>({
) : (
<SaveButton
form={formElement}
isInRecordSet={isInRecordSet}
resource={resource}
onAdd={handleAdd}
onCarryBulk={handleCarryBulk}
Expand All @@ -243,7 +244,6 @@ export function ResourceView<SCHEMA extends AnySchema>({
handleSaved();
}}
onSaving={handleSaving}
isInRecordSet={isInRecordSet}
/>
)
) : undefined;
Expand Down
2 changes: 1 addition & 1 deletion specifyweb/frontend/js_src/lib/components/Forms/Save.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ export function SaveButton<SCHEMA extends AnySchema = AnySchema>({
// Scroll to the top of the form on clone
smoothScroll(form, 0);
// Loading(handleClick().then(handleAdd));
const ids: number[] = [originalResourceId ?? 1];
const ids: readonly number[] = [originalResourceId ?? 1];
loading(
handleClick()
.then((result) => {
Expand Down

0 comments on commit ffa931c

Please sign in to comment.