Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement prefs and other functionalities for Tectonic trees #5345

Draft
wants to merge 6 commits into
base: issue-5294
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 5 commits
Commits
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 @@ -29,6 +29,8 @@ exports[`allTablesWithAttachments 1`] = `
"[table Storage]",
"[table Taxon]",
"[table TreatmentEvent]",
"[table AbsoluteAge]",
"[table RelativeAge]",
]
`;

Expand Down Expand Up @@ -62,5 +64,7 @@ exports[`attachmentRelatedTables 1`] = `
"StorageAttachment",
"TaxonAttachment",
"TreatmentEventAttachment",
"AbsoluteAgeAttachment",
"RelativeAgeAttachment",
]
`;
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ exports[`fields are loaded 1`] = `
"[literalField CollectionObject.yesNo4]",
"[literalField CollectionObject.yesNo5]",
"[literalField CollectionObject.yesNo6]",
"[relationship CollectionObject.absoluteAges]",
"[relationship CollectionObject.accession]",
"[relationship CollectionObject.agent1]",
"[relationship CollectionObject.appraisal]",
Expand Down Expand Up @@ -95,6 +96,7 @@ exports[`fields are loaded 1`] = `
"[relationship CollectionObject.paleoContext]",
"[relationship CollectionObject.preparations]",
"[relationship CollectionObject.projects]",
"[relationship CollectionObject.relativeAges]",
"[relationship CollectionObject.rightSideRels]",
"[relationship CollectionObject.treatmentEvents]",
"[relationship CollectionObject.visibilitySetBy]",
Expand Down Expand Up @@ -1214,6 +1216,7 @@ exports[`localization is loaded 1`] = `

exports[`relationships are loaded 1`] = `
[
"[relationship CollectionObject.absoluteAges]",
"[relationship CollectionObject.accession]",
"[relationship CollectionObject.agent1]",
"[relationship CollectionObject.appraisal]",
Expand Down Expand Up @@ -1244,6 +1247,7 @@ exports[`relationships are loaded 1`] = `
"[relationship CollectionObject.paleoContext]",
"[relationship CollectionObject.preparations]",
"[relationship CollectionObject.projects]",
"[relationship CollectionObject.relativeAges]",
"[relationship CollectionObject.rightSideRels]",
"[relationship CollectionObject.treatmentEvents]",
"[relationship CollectionObject.visibilitySetBy]",
Expand All @@ -1253,6 +1257,9 @@ exports[`relationships are loaded 1`] = `

exports[`tableScoping 1`] = `
{
"AbsoluteAge": "collectionObject",
"AbsoluteAgeAttachment": "absoluteAge > collectionObject",
"AbsoluteAgeCitation": "absoluteAge > collectionObject",
"Accession": "division",
"AccessionAgent": "accession > division",
"AccessionAttachment": "accession > division",
Expand Down Expand Up @@ -1295,7 +1302,7 @@ exports[`tableScoping 1`] = `
"CollectionObjectAttribute": undefined,
"CollectionObjectCitation": "collectionObject",
"CollectionObjectGroup": "collection",
"CollectionObjectGroupJoin": "parentcog > collection",
"CollectionObjectGroupJoin": "parentCog > collection",
"CollectionObjectGroupType": "collection",
"CollectionObjectProperty": "collectionObject",
"CollectionObjectType": "collection",
Expand Down Expand Up @@ -1400,6 +1407,9 @@ exports[`tableScoping 1`] = `
"RecordSetItem": undefined,
"ReferenceWork": undefined,
"ReferenceWorkAttachment": undefined,
"RelativeAge": "collectionObject",
"RelativeAgeAttachment": "relativeAge > collectionObject",
"RelativeAgeCitation": "relativeAge > collectionObject",
"RepositoryAgreement": "division",
"RepositoryAgreementAttachment": "repositoryAgreement > division",
"Role": "collection",
Expand Down Expand Up @@ -1443,6 +1453,9 @@ exports[`tableScoping 1`] = `
"TaxonCitation": "taxon > definition > discipline",
"TaxonTreeDef": "discipline",
"TaxonTreeDefItem": "treeDef > discipline",
"TectonicUnit": "definition > discipline",
"TectonicUnitTreeDef": "discipline",
"TectonicUnitTreeDefItem": "treeDef > discipline",
"TreatmentEvent": "collectionObject",
"TreatmentEventAttachment": "treatmentEvent > collectionObject",
"UniquenessRule": "discipline",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,7 @@ test('tableScoping', () =>
test('indexed fields are loaded', () =>
expect(tables.CollectionObject.field).toMatchInlineSnapshot(`
{
"absoluteAges": "[relationship CollectionObject.absoluteAges]",
"accession": "[relationship CollectionObject.accession]",
"actualTotalCountAmt": "[literalField CollectionObject.actualTotalCountAmt]",
"age": "[literalField CollectionObject.age]",
Expand Down Expand Up @@ -430,6 +431,7 @@ test('indexed fields are loaded', () =>
"preparations": "[relationship CollectionObject.preparations]",
"projectNumber": "[literalField CollectionObject.projectNumber]",
"projects": "[relationship CollectionObject.projects]",
"relativeAges": "[relationship CollectionObject.relativeAges]",
"remarks": "[literalField CollectionObject.remarks]",
"reservedInteger3": "[literalField CollectionObject.reservedInteger3]",
"reservedInteger4": "[literalField CollectionObject.reservedInteger4]",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ exports[`Tables with form tables computed correctly 1`] = `
"[table RepositoryAgreement]",
"[table RepositoryAgreementAttachment]",
"[table Shipment]",
"[table SpAuditLog]",
"[table Storage]",
"[table StorageAttachment]",
"[table StorageTreeDef]",
Expand All @@ -144,5 +145,14 @@ exports[`Tables with form tables computed correctly 1`] = `
"[table CollectionObjectGroup]",
"[table CollectionObjectGroupJoin]",
"[table CollectionObjectGroupType]",
"[table AbsoluteAge]",
"[table RelativeAge]",
"[table AbsoluteAgeAttachment]",
"[table RelativeAgeAttachment]",
"[table AbsoluteAgeCitation]",
"[table RelativeAgeCitation]",
"[table TectonicUnitTreeDef]",
"[table TectonicUnitTreeDefItem]",
"[table TectonicUnit]",
]
`;
Original file line number Diff line number Diff line change
Expand Up @@ -2032,6 +2032,16 @@ exports[`Formatters are fetched and parsed correctly 1`] = `

exports[`getMainTableFields 1`] = `
{
"AbsoluteAge": [
"ageType",
"datingMethod",
],
"AbsoluteAgeAttachment": [],
"AbsoluteAgeCitation": [
"figureNumber",
"pageNumber",
"plateNumber",
],
"Accession": [
"accessionNumber",
"status",
Expand Down Expand Up @@ -2604,6 +2614,16 @@ exports[`getMainTableFields 1`] = `
"volume",
],
"ReferenceWorkAttachment": [],
"RelativeAge": [
"ageType",
"datingMethod",
],
"RelativeAgeAttachment": [],
"RelativeAgeCitation": [
"figureNumber",
"pageNumber",
"plateNumber",
],
"RepositoryAgreement": [
"repositoryAgreementNumber",
"status",
Expand Down Expand Up @@ -2743,6 +2763,23 @@ exports[`getMainTableFields 1`] = `
"textBefore",
"title",
],
"TectonicUnit": [
"name",
"fullName",
"guid",
"text1",
"text2",
],
"TectonicUnitTreeDef": [
"name",
],
"TectonicUnitTreeDefItem": [
"name",
"fullNameSeparator",
"textAfter",
"textBefore",
"title",
],
"TreatmentEvent": [
"treatmentNumber",
"type",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ requireContext();
test('Parent table relationships are calculated properly', () =>
expect(parentTableRelationship()).toMatchInlineSnapshot(`
{
"AbsoluteAgeAttachment": "[relationship AbsoluteAgeAttachment.absoluteAge]",
"AbsoluteAgeCitation": "[relationship AbsoluteAgeCitation.absoluteAge]",
"AccessionAgent": "[relationship AccessionAgent.accession]",
"AccessionAttachment": "[relationship AccessionAttachment.accession]",
"AccessionAuthorization": "[relationship AccessionAuthorization.accession]",
Expand All @@ -31,7 +33,7 @@ test('Parent table relationships are calculated properly', () =>
"CollectionObjectAttachment": "[relationship CollectionObjectAttachment.collectionObject]",
"CollectionObjectAttr": "[relationship CollectionObjectAttr.collectionObject]",
"CollectionObjectCitation": "[relationship CollectionObjectCitation.collectionObject]",
"CollectionObjectGroupJoin": "[relationship CollectionObjectGroupJoin.parentcog]",
"CollectionObjectGroupJoin": "[relationship CollectionObjectGroupJoin.parentCog]",
"CollectionObjectProperty": "[relationship CollectionObjectProperty.collectionObject]",
"Collector": "[relationship Collector.collectingEvent]",
"CommonNameTx": "[relationship CommonNameTx.taxon]",
Expand Down Expand Up @@ -86,6 +88,8 @@ test('Parent table relationships are calculated properly', () =>
"PreparationProperty": "[relationship PreparationProperty.preparation]",
"RecordSetItem": "[relationship RecordSetItem.recordSet]",
"ReferenceWorkAttachment": "[relationship ReferenceWorkAttachment.referenceWork]",
"RelativeAgeAttachment": "[relationship RelativeAgeAttachment.relativeAge]",
"RelativeAgeCitation": "[relationship RelativeAgeCitation.relativeAge]",
"RepositoryAgreementAttachment": "[relationship RepositoryAgreementAttachment.repositoryAgreement]",
"RolePolicy": "[relationship RolePolicy.role]",
"SpAppResourceData": "[relationship SpAppResourceData.spAppResource]",
Expand All @@ -99,6 +103,7 @@ test('Parent table relationships are calculated properly', () =>
"TaxonAttachment": "[relationship TaxonAttachment.taxon]",
"TaxonCitation": "[relationship TaxonCitation.taxon]",
"TaxonTreeDefItem": "[relationship TaxonTreeDefItem.treeDef]",
"TectonicUnitTreeDefItem": "[relationship TectonicUnitTreeDefItem.treeDef]",
"TreatmentEventAttachment": "[relationship TreatmentEventAttachment.treatmentEvent]",
"UniquenessRuleField": "[relationship UniquenessRuleField.uniquenessrule]",
"WorkbenchRow": "[relationship WorkbenchRow.workbench]",
Expand Down
Loading
Loading