Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
36 changes: 20 additions & 16 deletions frontend/src/components/BrutalismButton.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,16 @@ export default function BrutalismButton({
position: "relative",
width: "auto",
height: "auto",
background: backgroundColor,
border: `2px solid ${borderColor}`,
backgroundColor: disabled ? "gray" : backgroundColor,
border: disabled
? "gray"
: borderColor
? `2px solid ${borderColor}`
: `2px solid ${backgroundColor}`,
boxShadow: boxShadowStyle,
borderRadius: "4.8px",
fontSize: "16px",
color: color,
color: disabled ? "black" : color,
fontWeight: "bold",
margin: "8px 8px 0 0",
whiteSpace: "nowrap",
Expand All @@ -68,19 +72,19 @@ export default function BrutalismButton({
>
{children}
<span style={{ marginLeft: 10 }}></span>
{
noArrow ? null : <svg
xmlns="http://www.w3.org/2000/svg"
width="14"
height="14"
fill="currentColor"
className="bi bi-arrow-right-circle-fill"
viewBox="0 0 16 16"
>
<path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0M4.5 7.5a.5.5 0 0 0 0 1h5.793l-2.147 2.146a.5.5 0 0 0 .708.708l3-3a.5.5 0 0 0 0-.708l-3-3a.5.5 0 1 0-.708.708L10.293 7.5H4.5z" />
</svg>
}

{noArrow ? null : (
<svg
xmlns="http://www.w3.org/2000/svg"
width="14"
height="14"
fill="currentColor"
className="bi bi-arrow-right-circle-fill"
viewBox="0 0 16 16"
>
<path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0M4.5 7.5a.5.5 0 0 0 0 1h5.793l-2.147 2.146a.5.5 0 0 0 .708.708l3-3a.5.5 0 0 0 0-.708l-3-3a.5.5 0 1 0-.708.708L10.293 7.5H4.5z" />
</svg>
)}
</a>
</Button>
);
Expand Down
12 changes: 7 additions & 5 deletions frontend/src/components/MainButton.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,13 @@ export default function MainButton({
type={type}
className={`d-flex justify-content-center align-items-center ${className}`}
style={{
backgroundColor: backgroundColor,
border: borderColor
? `2px solid ${borderColor}`
: `2px solid ${backgroundColor}`,
color: color,
backgroundColor: disabled ? "gray" : backgroundColor,
border: disabled
? "gray"
: borderColor
? `2px solid ${borderColor}`
: `2px solid ${backgroundColor}`,
color: disabled ? "black" : color,
margin: "8px",
borderRadius: "4.8px",
fontWeight: "bold",
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/locale/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,7 @@
"FILTER_BULK_IMPORT_FILE_NAMES": "Dateinamen für den Massenimport",
"BULK_IMPORT_SEND_TO_IDENTIFICATION": "Zur Identifizierung senden",
"BULK_IMPORT_LOCATION_ID_DESC": "Je mehr Optionen Sie auswählen, desto länger dauert die Identifizierung. Seien Sie so präzise wie möglich.",
"DANGER_ZONE": "Gefahrenzone"
"DANGER_ZONE": "Gefahrenzone",
"BULK_IMPORT_SEND_TO_IDENTIFICATION_DISABLED_DESC": "Die Schaltfläche ist deaktiviert, wenn die Erkennung oder die erste Identifizierungsaufgabe nicht abgeschlossen ist. Bitte warten Sie, bis die Aufgabe abgeschlossen ist, bevor Sie zur Identifizierung senden."
}

3 changes: 2 additions & 1 deletion frontend/src/locale/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -525,5 +525,6 @@
"FILTER_BULK_IMPORT_FILE_NAMES": "Bulk Import File Names",
"BULK_IMPORT_SEND_TO_IDENTIFICATION": "Send to Identification",
"BULK_IMPORT_LOCATION_ID_DESC": "The more options you select, the longer identification takes. Be as specific as possible.",
"DANGER_ZONE": "Danger Zone"
"DANGER_ZONE": "Danger Zone",
"BULK_IMPORT_SEND_TO_IDENTIFICATION_DISABLED_DESC": "Button is disabled if detection or initial identification task is incomplete. Please wait for the task to complete before sending to identification."
}
3 changes: 2 additions & 1 deletion frontend/src/locale/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -524,5 +524,6 @@
"FILTER_BULK_IMPORT_FILE_NAMES": "Nombres de archivos de importación masiva",
"BULK_IMPORT_SEND_TO_IDENTIFICATION": "Enviar para identificación",
"BULK_IMPORT_LOCATION_ID_DESC": "Cuantas más opciones seleccione, más tiempo tardará la identificación. Sea lo más específico posible.",
"DANGER_ZONE": "Zona de Peligro"
"DANGER_ZONE": "Zona de Peligro",
"BULK_IMPORT_SEND_TO_IDENTIFICATION_DISABLED_DESC": "El botón está deshabilitado si la detección o la tarea de identificación inicial no se ha completado. Espere a que la tarea finalice antes de enviar a identificación."
}
3 changes: 2 additions & 1 deletion frontend/src/locale/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -524,5 +524,6 @@
"FILTER_BULK_IMPORT_FILE_NAMES": "Noms de fichiers d'importation en masse",
"BULK_IMPORT_SEND_TO_IDENTIFICATION": "Envoyer à l’identification",
"BULK_IMPORT_LOCATION_ID_DESC": "Plus vous sélectionnez d’options, plus l’identification prendra du temps. Soyez aussi précis que possible.",
"DANGER_ZONE": "Zone de danger"
"DANGER_ZONE": "Zone de danger",
"BULK_IMPORT_SEND_TO_IDENTIFICATION_DISABLED_DESC": "Le bouton est désactivé si la détection ou la tâche d’identification initiale n’est pas terminée. Veuillez attendre la fin de la tâche avant d’envoyer à l’identification."
}
3 changes: 2 additions & 1 deletion frontend/src/locale/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -525,5 +525,6 @@
"FILTER_BULK_IMPORT_FILE_NAMES": "Nomi dei file di importazione in blocco",
"BULK_IMPORT_SEND_TO_IDENTIFICATION": "Invia per l’identificazione",
"BULK_IMPORT_LOCATION_ID_DESC": "Più opzioni selezioni, più tempo richiederà l’identificazione. Sii il più specifico possibile.",
"DANGER_ZONE": "Zona pericolosa"
"DANGER_ZONE": "Zona pericolosa",
"BULK_IMPORT_SEND_TO_IDENTIFICATION_DISABLED_DESC": "Il pulsante è disabilitato se il rilevamento o l’attività di identificazione iniziale non è completata. Attendere il completamento dell’attività prima di inviare all’identificazione."
}
16 changes: 16 additions & 0 deletions frontend/src/pages/BulkImport/BulkImportTask.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,22 @@ const BulkImportTask = observer(() => {
>
<FormattedMessage id="BULK_IMPORT_SEND_TO_IDENTIFICATION" />
</MainButton>
{((!userRoles?.includes("admin") &&
!userRoles?.includes("researcher")) ||
!store.locationIDString ||
task?.status !== "complete" ||
task?.iaSummary?.detectionStatus !== "complete") && (
<p
style={{
color: theme.grayColors.gray500,
}}
>
<FormattedMessage
id="BULK_IMPORT_SEND_TO_IDENTIFICATION_DISABLED_DESC"
defaultMessage="Button is disabled if detection or initial identification task is incomplete"
/>
</p>
)}
</Col>
</Row>
<Row>
Expand Down
Loading