-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add scheme rights form/report, #151 #180
Conversation
@njkim when able, could you rebase this? Looks like there's a lot of leakage from Johnathan's work. |
b889521
to
79a9a92
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks pretty good so far, just a few things 👍
arches_lingo/src/arches_lingo/components/scheme/report/SchemeLicense.vue
Show resolved
Hide resolved
todo | ||
</SchemeReportSection> | ||
<div> | ||
<div v-if="!mode || mode === VIEW"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason this section is divided by mode? Shouldn't it just be an arg fed into sub components, or am I missing something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I may be missing something here... could it not be 1 set of components? eg
<div>
<h4>{{ $gettext("Rights Holders") }}</h4>
<ResourceInstanceRelationships
:value="schemeRights?.right_holder"
:options="actorRdmOptions"
:mode="mode"
@update="
(val) =>
onUpdateResourceInstance(
'right_holder',
val,
actorRdmOptions ?? [],
)
"
/>
<h4>{{ $gettext("Rights Type") }}</h4>
<ReferenceDatatype
:value="schemeRights?.right_type"
:options="rightTypeOptions"
:multi-value="false"
:mode="mode"
@update="
(val) =>
onUpdateSchemeRightReferenceDatatype(
'right_type',
val,
)
"
/>
</div>
<div>
<h4>{{ $gettext("Statement") }}</h4>
<NonLocalizedString
:value="schemeRightStatement?.right_statement_content"
:mode="mode"
@update="
(val) => onUpdateString('right_statement_content', val)
"
/>
<h4>{{ $gettext("Statement Language") }}</h4>
<ReferenceDatatype
:value="schemeRightStatement?.right_statement_language"
:mode="mode"
:multi-value="false"
:options="languageOptions"
@update="
(val) =>
onUpdateSchemeRightStatementReferenceDatatype(
'right_statement_language',
val,
)
"
/>
<h4>{{ $gettext("Statement Type") }}</h4>
<ReferenceDatatype
:value="schemeRightStatement?.right_statement_type"
:mode="mode"
:multi-value="false"
:options="noteOptions"
@update="
(val) =>
onUpdateSchemeRightStatementReferenceDatatype(
'right_statement_type',
val,
)
"
/>
<h4>{{ $gettext("Statement Type Metatype") }}</h4>
<ReferenceDatatype
:value="schemeRightStatement?.right_statement_type_metatype"
:mode="mode"
:multi-value="false"
:options="metatypesOptions"
@update="
(val) =>
onUpdateSchemeRightStatementReferenceDatatype(
'right_statement_type_metatype',
val,
)
"
/>
<Button
v-if="mode === EDIT"
:label="$gettext('Update')"
@click="saveRights"
></Button>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chrabyrd Ah, I see what you mean. That makes sense. Thought they looked different enough but I can see that they can be combined.
@njkim this appears to be failing builds. It looks like something the pre-commit hooks would catch, but if not mind running |
todo | ||
</SchemeReportSection> | ||
<div> | ||
<div v-if="!mode || mode === VIEW"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I may be missing something here... could it not be 1 set of components? eg
<div>
<h4>{{ $gettext("Rights Holders") }}</h4>
<ResourceInstanceRelationships
:value="schemeRights?.right_holder"
:options="actorRdmOptions"
:mode="mode"
@update="
(val) =>
onUpdateResourceInstance(
'right_holder',
val,
actorRdmOptions ?? [],
)
"
/>
<h4>{{ $gettext("Rights Type") }}</h4>
<ReferenceDatatype
:value="schemeRights?.right_type"
:options="rightTypeOptions"
:multi-value="false"
:mode="mode"
@update="
(val) =>
onUpdateSchemeRightReferenceDatatype(
'right_type',
val,
)
"
/>
</div>
<div>
<h4>{{ $gettext("Statement") }}</h4>
<NonLocalizedString
:value="schemeRightStatement?.right_statement_content"
:mode="mode"
@update="
(val) => onUpdateString('right_statement_content', val)
"
/>
<h4>{{ $gettext("Statement Language") }}</h4>
<ReferenceDatatype
:value="schemeRightStatement?.right_statement_language"
:mode="mode"
:multi-value="false"
:options="languageOptions"
@update="
(val) =>
onUpdateSchemeRightStatementReferenceDatatype(
'right_statement_language',
val,
)
"
/>
<h4>{{ $gettext("Statement Type") }}</h4>
<ReferenceDatatype
:value="schemeRightStatement?.right_statement_type"
:mode="mode"
:multi-value="false"
:options="noteOptions"
@update="
(val) =>
onUpdateSchemeRightStatementReferenceDatatype(
'right_statement_type',
val,
)
"
/>
<h4>{{ $gettext("Statement Type Metatype") }}</h4>
<ReferenceDatatype
:value="schemeRightStatement?.right_statement_type_metatype"
:mode="mode"
:multi-value="false"
:options="metatypesOptions"
@update="
(val) =>
onUpdateSchemeRightStatementReferenceDatatype(
'right_statement_type_metatype',
val,
)
"
/>
<Button
v-if="mode === EDIT"
:label="$gettext('Update')"
@click="saveRights"
></Button>
ontologyProperty: "ac41d9be-79db-4256-b368-2f4559cfbe55", | ||
inverseOntologyProperty: "ac41d9be-79db-4256-b368-2f4559cfbe55", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a way to not hardcode UUIDs on the frontend? If not addressed here, could you file a followup ticket for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chrabyrd The uuids are removed because the ontology on the current models are actually not assigned (though I believe they should be).
I agree that they should not be hard-coded here, especially since the graph can change.
I think we need more discussion where/how it should get. I feel the related resource object should not be built at all in the front-end but I am not sure.
Here is a new ticket. #191
const metatypesOptions = ref<ControlledListItem[]>(); | ||
const parentExists = ref(false); | ||
|
||
withDefaults( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: props go just under imports
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm -- thanks for writing the followup tickets! 🚀
Add the scheme rights and the right statement cards to the scheme report/editor.
Two cardinality-1 cards are treated as one card.