Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
d76789b
Update Interaction localization
grantfitzsimmons Jan 17, 2025
daa990c
Add Disposal to Interactions dialog
grantfitzsimmons Jan 17, 2025
4800238
Update interactions.ts
grantfitzsimmons Jan 17, 2025
eaf9a6c
Hide interactions when none are available
grantfitzsimmons Jan 17, 2025
0c27b37
Remove unused text
grantfitzsimmons Jan 17, 2025
81067b5
Use localized Preparation table name
grantfitzsimmons Jan 18, 2025
416dfb2
Lint code with ESLint and Prettier
grantfitzsimmons Jan 18, 2025
702e118
Improve localization for Preparations
grantfitzsimmons Jan 19, 2025
33caf9b
Resolve conflicts
grantfitzsimmons Jan 19, 2025
aa4dfda
Update interactions.ts
grantfitzsimmons Jan 19, 2025
268110e
Fix no interactions label
grantfitzsimmons Jan 19, 2025
634aef1
Improve Preparation localization further
grantfitzsimmons Jan 19, 2025
b7f1896
Finish localizing preparations
grantfitzsimmons Jan 19, 2025
bd0efb5
Merge branch 'production' into issue-6108
grantfitzsimmons Jan 19, 2025
59802e1
Add tables import
grantfitzsimmons Jan 19, 2025
0371f02
Lint code with ESLint and Prettier
grantfitzsimmons Jan 19, 2025
6c6d365
Show all related interactions in ShowLoans dialog
melton-jason Jan 20, 2025
3bdad09
Remove duplicates from returned Interaction request
melton-jason Jan 20, 2025
34b0e89
Update specifyweb/frontend/js_src/lib/components/FormCommands/index.tsx
grantfitzsimmons Jan 21, 2025
14474fb
Merge remote-tracking branch 'origin/main' into issue-6108-b
melton-jason Jul 3, 2025
43e4c86
Run Prettier on all files
melton-jason Jul 3, 2025
f9e5fd7
Merge remote-tracking branch 'origin/issue-6108-b' into issue-6108
melton-jason Jul 3, 2025
c7e73f0
Remove unused localization strings
melton-jason Jul 3, 2025
aadcb21
Move handling of fetching related Interactions to parent
melton-jason Jul 3, 2025
e1a6134
Lint code with ESLint and Prettier
melton-jason Jul 3, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -403,5 +403,5 @@ function ResourceItem({
}

export const exportsForTests = {
mutateConformation
}
mutateConformation,
};
14 changes: 7 additions & 7 deletions specifyweb/frontend/js_src/lib/components/Attachments/Cell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ export function AttachmentCell({
readonly onOpen: () => void;
readonly related: GetSet<SpecifyResource<AnySchema> | undefined>;
readonly onViewRecord:
| ((table: SpecifyTable, recordId: number) => void)
| undefined;
| ((table: SpecifyTable, recordId: number) => void)
| undefined;
}): JSX.Element {
const table = f.maybe(attachment.tableID ?? undefined, getAttachmentTable);

Expand All @@ -49,8 +49,8 @@ export function AttachmentCell({
return (
<div className="relative">
{typeof handleViewRecord === 'function' &&
table !== undefined &&
hasTablePermission(table.name, 'read') ? (
table !== undefined &&
hasTablePermission(table.name, 'read') ? (
<AttachmentRecordLink
attachment={attachment}
className="absolute left-0 top-0"
Expand Down Expand Up @@ -121,9 +121,9 @@ export function AttachmentRecordLink({
(typeof related === 'object'
? Promise.resolve(related)
: fetchAttachmentParent(table, attachment).then((related) => {
setRelated(related);
return related;
})
setRelated(related);
return related;
})
)
.then((related) =>
typeof related === 'object'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,15 +136,15 @@ function AttachmentsImport({
eagerDataSet.uploadplan.staticPathKey === undefined
? { uploadFile: file }
: {
uploadFile: {
...file,
parsedName: resolveFileNames(
file.file.name,
eagerDataSet.uploadplan.formatQueryResults,
eagerDataSet.uploadplan.fieldFormatter
),
uploadFile: {
...file,
parsedName: resolveFileNames(
file.file.name,
eagerDataSet.uploadplan.formatQueryResults,
eagerDataSet.uploadplan.fieldFormatter
),
},
},
},
[eagerDataSet.uploadplan.staticPathKey]
);

Expand All @@ -165,7 +165,7 @@ function AttachmentsImport({
eagerDataSet.uploadplan.staticPathKey === undefined
? undefined
: staticAttachmentImportPaths[eagerDataSet.uploadplan.staticPathKey]
.baseTable;
.baseTable;

const anyUploaded = React.useMemo(
() =>
Expand Down Expand Up @@ -213,10 +213,10 @@ function AttachmentsImport({
{eagerDataSet.uploadplan.staticPathKey === undefined
? ''
: strictGetTable(currentBaseTable).strictGetField(
staticAttachmentImportPaths[
eagerDataSet.uploadplan.staticPathKey
].path
).label}
staticAttachmentImportPaths[
eagerDataSet.uploadplan.staticPathKey
].path
).label}
</>
)}
</div>
Expand Down Expand Up @@ -267,11 +267,11 @@ function AttachmentsImport({
anyUploaded
? undefined
: (uploadSpec) => {
commitChange((oldState) => ({
...oldState,
uploadplan: uploadSpec,
}));
}
commitChange((oldState) => ({
...oldState,
uploadplan: uploadSpec,
}));
}
}
/>
</div>
Expand Down Expand Up @@ -340,14 +340,14 @@ function AttachmentsImport({
...oldState,
rows: oldState.rows.map((uploadable, index) =>
parsedName !== undefined &&
(multiple || index === indexToDisambiguate) &&
// Redundant check for single disambiguation, but needed for disambiguate multiples
parsedName === uploadable.uploadFile?.parsedName &&
uploadable.attachmentId === undefined
(multiple || index === indexToDisambiguate) &&
// Redundant check for single disambiguation, but needed for disambiguate multiples
parsedName === uploadable.uploadFile?.parsedName &&
uploadable.attachmentId === undefined
? {
...uploadable,
disambiguated: disambiguatedId,
}
...uploadable,
disambiguated: disambiguatedId,
}
: uploadable
),
};
Expand All @@ -357,21 +357,21 @@ function AttachmentsImport({
/>

{eagerDataSet.uploaderstatus === 'validating' &&
eagerDataSet.uploadplan.staticPathKey !== undefined ? (
eagerDataSet.uploadplan.staticPathKey !== undefined ? (
<AttachmentsValidationDialog
files={eagerDataSet.rows}
uploadSpec={eagerDataSet.uploadplan}
onValidated={(validatedFiles) =>
validatedFiles === undefined
? undefined
: commitChange(
(oldState) => ({
...oldState,
uploaderstatus: 'main',
rows: validatedFiles,
}),
true
)
(oldState) => ({
...oldState,
uploaderstatus: 'main',
rows: validatedFiles,
}),
true
)
}
/>
) : null}
Expand Down
Loading