diff --git a/client/src/lib/hooks/useUnsavedChangesNotifier/useUnsavedChangesNotifier.tsx b/client/src/lib/hooks/useUnsavedChangesNotifier/useUnsavedChangesNotifier.tsx index ed43115..659c979 100644 --- a/client/src/lib/hooks/useUnsavedChangesNotifier/useUnsavedChangesNotifier.tsx +++ b/client/src/lib/hooks/useUnsavedChangesNotifier/useUnsavedChangesNotifier.tsx @@ -1,3 +1,4 @@ +import { t } from "i18next"; import { useCallback, useEffect } from "react"; import { useBlocker } from "react-router-dom"; import { useWarnAboutChange } from "./useWarnAboutChange"; @@ -14,10 +15,10 @@ export type UnsavedChangesNotifierProps = { export const useUnsavedChangesNotifier = ({ isDirty = false, - title = "Se han detectado cambios", - subtitle = "Atención, hay cambios pendientes de guardar en esta página.\nSi continúa, perderá los cambios.", - confirmText = "Continuar", - cancelText = "No continuar", + title = t("hooks.use_unsaved_changes_notifier.title"), + subtitle = t("hooks.use_unsaved_changes_notifier.subtitle"), + confirmText = t("hooks.use_unsaved_changes_notifier.confirm_text"), + cancelText = t("hooks.use_unsaved_changes_notifier.cancel_text"), onConfirm, onCancel, type = "warning", diff --git a/client/src/locales/en.json b/client/src/locales/en.json index beacf5a..5bb48a9 100644 --- a/client/src/locales/en.json +++ b/client/src/locales/en.json @@ -68,6 +68,14 @@ "subtitle": "This may take a few seconds. Please do not close this page." } }, + "hooks": { + "use_unsaved_changes_notifier": { + "title": "Changes detected", + "subtitle": "Caution, there are pending changes to save on this page.\nIf you continue, you will lose the changes.", + "confirm_text": "Continue", + "cancel_text": "Cancel" + } + }, "main_menu": { "home": "Home", "settings": "Settings", diff --git a/client/src/locales/es.json b/client/src/locales/es.json index 8d52cfa..116c05a 100644 --- a/client/src/locales/es.json +++ b/client/src/locales/es.json @@ -68,6 +68,14 @@ "subtitle": "Esto puede tardar unos segundos. Por favor, no cierre esta página." } }, + "hooks": { + "use_unsaved_changes_notifier": { + "title": "Se han detectado cambios", + "subtitle": "Atención, hay cambios pendientes de guardar en esta página.\nSi continúa, perderá los cambios.", + "confirm_text": "Continuar", + "cancel_text": "No continuar" + } + }, "main_menu": { "home": "Inicio", "settings": "Ajustes", diff --git a/server/src/contexts/sales/domain/entities/Quotes/QuoteStatus.ts b/server/src/contexts/sales/domain/entities/Quotes/QuoteStatus.ts index d2ce1ce..882fcdd 100644 --- a/server/src/contexts/sales/domain/entities/Quotes/QuoteStatus.ts +++ b/server/src/contexts/sales/domain/entities/Quotes/QuoteStatus.ts @@ -29,7 +29,7 @@ export class QuoteStatus extends ValueObject { QUOTE_STATUS.DELIVERED, QUOTE_STATUS.ACCEPTED, QUOTE_STATUS.REJECTED, - QUOTE_STATUS.DRAFT + QUOTE_STATUS.ARCHIVED ) .label(options.label ? options.label : "status");