diff --git a/resources/src/locales/en.json b/resources/src/locales/en.json index 685c2c1a..4b32c812 100644 --- a/resources/src/locales/en.json +++ b/resources/src/locales/en.json @@ -651,7 +651,8 @@ "publication-updated-successfully": "Publication updated successfully", "title": "Publication", "attach-supplementary-files": "Supplementary Files", - "attach-supplementary-files-details": "Please upload all relevant supplementary files for your publications." + "attach-supplementary-files-details": "Please upload all relevant supplementary files for your publications.", + "no-supplementary-files": "No supplementary files attached." }, "publications-view": { "all-published-publications-details": "All published publications", diff --git a/resources/src/locales/fr.json b/resources/src/locales/fr.json index 4c447a70..1ecb94ec 100644 --- a/resources/src/locales/fr.json +++ b/resources/src/locales/fr.json @@ -224,7 +224,7 @@ "unique-id": "Identifiant unique", "unknown": "Inconnue", "update": "Mettre à jour", - "updated-successfully": "Mis à jour réussie ", + "updated-successfully": "mise à jour réussie ", "upload": "Télécharger", "user": "Utilisateur", "validation": { @@ -651,7 +651,8 @@ "publication-updated-successfully": "Publication mise à jour avec succès", "title": "Publication", "attach-supplementary-files": "Fichiers supplémentaires", - "attach-supplementary-files-details": "Veuillez télécharger tous les fichiers supplémentaires pertinents pour vos publications." + "attach-supplementary-files-details": "Veuillez télécharger tous les fichiers supplémentaires pertinents pour vos publications.", + "no-supplementary-files": "Aucun fichier supplémentaire joint." }, "publications-view": { "all-published-publications-details": "Toutes les publications publiées", diff --git a/resources/src/models/ManuscriptRecord/ManuscriptRecord.ts b/resources/src/models/ManuscriptRecord/ManuscriptRecord.ts index ddf33fb3..a20fdf5c 100644 --- a/resources/src/models/ManuscriptRecord/ManuscriptRecord.ts +++ b/resources/src/models/ManuscriptRecord/ManuscriptRecord.ts @@ -75,9 +75,17 @@ export type ManuscriptRecordSummary = Omit< | 'can_attach_manuscript' > +export interface ManuscriptRecordMetadata { + id: number + ulid: string + region_id: number + reviewed_at: string | null +} + export type ManuscriptRecordResource = Resource export type ManuscriptRecordResourceList = ResourceList export type ManuscriptRecordSummaryResource = Resource +export type ManuscriptRecordMetadataResource = Resource export type ManuscriptRecordSummaryResourceList = ResourceList @@ -96,6 +104,14 @@ export class ManuscriptRecordService { return response.data } + /** Get a manuscript record metadata */ + public static async metadata(id: number) { + const response = await http.get( + `${this.baseURL}/${id}/metadata`, + ) + return response.data + } + /** * Create a manuscript record. * diff --git a/resources/src/models/Media/components/SupplementaryFileTypeSelect.vue b/resources/src/models/Media/components/SupplementaryFileTypeSelect.vue index 69500bd4..3c941c7f 100644 --- a/resources/src/models/Media/components/SupplementaryFileTypeSelect.vue +++ b/resources/src/models/Media/components/SupplementaryFileTypeSelect.vue @@ -2,8 +2,12 @@ import type { SupplementaryFileOption, SupplementaryFileType } from '../supplementaryFileOptions' import { useSupplementaryFileOptions } from '../supplementaryFileOptions' +const props = defineProps<{ + hideMrf?: boolean +}>() + const model = defineModel() -const options = useSupplementaryFileOptions() +const options = useSupplementaryFileOptions(props.hideMrf) const localModel = ref(null) const { t } = useI18n() diff --git a/resources/src/models/Media/supplementaryFileOptions.ts b/resources/src/models/Media/supplementaryFileOptions.ts index 0268d64e..c40841fb 100644 --- a/resources/src/models/Media/supplementaryFileOptions.ts +++ b/resources/src/models/Media/supplementaryFileOptions.ts @@ -16,7 +16,7 @@ export interface SupplementaryFileOption { description: string } -export function useSupplementaryFileOptions() { +export function useSupplementaryFileOptions(hideMrf = false) { const { t } = useI18n() const options = computed(() => [ @@ -29,5 +29,9 @@ export function useSupplementaryFileOptions() { { label: () => t('supplementaryFileType.other'), value: 'other', description: t('supplementaryFileType.otherDescription') }, ]) + if (hideMrf) { + return computed(() => options.value.filter(option => option.value !== 'manuscript_record_form')) + } + return options } diff --git a/resources/src/models/Publication/components/PublicationFileManagementCard.vue b/resources/src/models/Publication/components/PublicationFileManagementCard.vue index 340da40a..e0310119 100644 --- a/resources/src/models/Publication/components/PublicationFileManagementCard.vue +++ b/resources/src/models/Publication/components/PublicationFileManagementCard.vue @@ -1,5 +1,5 @@