diff --git a/.deploy/k8s/k8s-manifest-api.dev.yaml b/.deploy/k8s/k8s-manifest-api.dev.yaml index 4c9f01c8a..152da82bf 100644 --- a/.deploy/k8s/k8s-manifest-api.dev.yaml +++ b/.deploy/k8s/k8s-manifest-api.dev.yaml @@ -38,6 +38,12 @@ spec: containers: - name: ever-teams-dev-api image: registry.digitalocean.com/ever/gauzy-api-demo:latest + resources: + requests: + memory: '1536Mi' + cpu: '1000m' + limits: + memory: '2048Mi' env: - name: API_HOST value: 0.0.0.0 diff --git a/.deploy/k8s/k8s-manifest-api.prod.yaml b/.deploy/k8s/k8s-manifest-api.prod.yaml index 3a82c54ae..11332f9d2 100644 --- a/.deploy/k8s/k8s-manifest-api.prod.yaml +++ b/.deploy/k8s/k8s-manifest-api.prod.yaml @@ -26,7 +26,7 @@ apiVersion: apps/v1 metadata: name: ever-teams-prod-api spec: - replicas: 3 + replicas: 6 selector: matchLabels: app: ever-teams-prod-api diff --git a/README.md b/README.md index 53be272ec..836fc8283 100644 --- a/README.md +++ b/README.md @@ -55,8 +55,8 @@ Note: Currently WIP, the screenshot is just a temporary picture :) ## 🔗 Links -- **** - Ever® Teams™ Platform Web Application (not yet in production release). -- **** - Ever® Teams™ Platform Demo Web Application (not yet in production release). +- **** - Ever® Teams™ Platform Web Application. +- **** - Ever® Teams™ Platform Demo Web Application. - **** - Ever® Teams™ Platform Documentation (WIP). - **** - Check more information about the Ever® Teams™ platform at the official website (WIP). - **** - Check more information about the Ever® Gauzy™ Platform at the official website. diff --git a/apps/web/app/[locale]/layout.tsx b/apps/web/app/[locale]/layout.tsx index f57f82cfb..bc513a35c 100644 --- a/apps/web/app/[locale]/layout.tsx +++ b/apps/web/app/[locale]/layout.tsx @@ -65,7 +65,6 @@ const LocaleLayout = ({ children, params: { locale }, pageProps }: Props) => { // eslint-disable-next-line @typescript-eslint/no-var-requires const messages = require(`../../messages/${locale}.json`); - console.log({ pageProps }); return ( {/* diff --git a/apps/web/app/[locale]/next-intl.d.ts b/apps/web/app/[locale]/next-intl.d.ts new file mode 100644 index 000000000..b92caeb90 --- /dev/null +++ b/apps/web/app/[locale]/next-intl.d.ts @@ -0,0 +1,25 @@ +import { Languages } from '../constants'; + +declare module 'next-intl' { + export type Translations = Languages; + type PathsToStringProps = T extends string + ? [] + : { [K in Extract]: [K, ...PathsToStringProps] }[Extract]; + + type Join = T extends [] + ? never + : T extends [infer F] + ? F + : T extends [infer F, ...infer R] + ? F extends string + ? `${F}${D}${Join, D>}` + : never + : string; + + export type DottedLanguageObjectStringPaths = Join, '.'>; + export type TranslationHooks = ( + key: DottedLanguageObjectStringPaths, + value?: any + ) => DottedLanguageObjectStringPaths; + export const useTranslations: () => TranslationHooks; +} diff --git a/apps/web/app/[locale]/unauthorized/page.tsx b/apps/web/app/[locale]/unauthorized/page.tsx new file mode 100644 index 000000000..567f399aa --- /dev/null +++ b/apps/web/app/[locale]/unauthorized/page.tsx @@ -0,0 +1,8 @@ +import UnauthorizedPage from '@components/pages/unauthorized'; +import React from 'react'; + +const page = () => { + return ; +}; + +export default page; diff --git a/apps/web/app/constants.ts b/apps/web/app/constants.ts index 5c4b500d9..1fdd241e7 100644 --- a/apps/web/app/constants.ts +++ b/apps/web/app/constants.ts @@ -1,6 +1,7 @@ import { JitsuOptions } from '@jitsu/jitsu-react/dist/useJitsu'; import { I_SMTPRequest } from './interfaces/ISmtp'; import { getNextPublicEnv } from './env'; +import enLanguage from '../messages/en.json'; export const API_BASE_URL = '/api'; export const DEFAULT_APP_PATH = '/auth/passcode'; @@ -166,7 +167,7 @@ export const APPLICATION_LANGUAGES_CODE = [ 'ru', 'es' ]; - +export type Languages = typeof enLanguage; export enum ActivityFilters { TASKS = 'Tasks', SCREENSHOOTS = 'Screenshots', diff --git a/apps/web/components/layout/footer/footer.tsx b/apps/web/components/layout/footer/footer.tsx index c13533e15..a7875ce7e 100644 --- a/apps/web/components/layout/footer/footer.tsx +++ b/apps/web/components/layout/footer/footer.tsx @@ -14,7 +14,7 @@ const Footer = () => { className="text-primary dark:text-gray-300" rel="noreferrer" > - {t('layout.footer.COPY_RIGHT3')} + {t('layout.footer.COPY_RIGHT4')}
by
{ -
{t('layout.footer.RIGHTS_RESERVERD')}
+
{t('layout.footer.RIGHTS_RESERVED')}
diff --git a/apps/web/components/layout/header/profile.tsx b/apps/web/components/layout/header/profile.tsx index 77afb49b5..b3008f35e 100644 --- a/apps/web/components/layout/header/profile.tsx +++ b/apps/web/components/layout/header/profile.tsx @@ -23,7 +23,7 @@ const Profile = () => { }, { name: t('links.common.TEAM'), icon: '/assets/svg/teams-icon.svg', link: '' }, { - name: t('links.common.Settings'), + name: t('links.common.SETTINGS'), icon: '/assets/svg/settings-icon.svg', link: '' } diff --git a/apps/web/components/pages/main/team-member.tsx b/apps/web/components/pages/main/team-member.tsx index a75d15942..cc52dafc2 100644 --- a/apps/web/components/pages/main/team-member.tsx +++ b/apps/web/components/pages/main/team-member.tsx @@ -105,12 +105,12 @@ const Header = () => {
{t('task.TITLE')}
-
{t('task.TASK_WORK.LABEL')}
+
{t('task.taskTableHead.TASK_WORK.LABEL')}
-
{t('task.TASK_TIME')}
+
{t('task.taskTableHead.TASK_TIME')}
- {t('task.TOTAL_WORK.LABEL')} + {t('task.taskTableHead.TOTAL_WORK.LABEL')}
diff --git a/apps/web/components/pages/unauthorized/index.tsx b/apps/web/components/pages/unauthorized/index.tsx new file mode 100644 index 000000000..ff53058a5 --- /dev/null +++ b/apps/web/components/pages/unauthorized/index.tsx @@ -0,0 +1,34 @@ +'use client'; + +import { LockClosedIcon } from '@radix-ui/react-icons'; +import { Button, Text } from 'lib/components'; +import { useTranslations } from 'next-intl'; +import Link from 'next/link'; +import React from 'react'; + +function UnauthorizedPage() { + const t = useTranslations(); + + return ( +
+
+ + {t('pages.unauthorized.TITLE')} +
+ + + {t('pages.unauthorized.HEADING_TITLE')} + +
+ + {t('pages.unauthorized.HEADING_DESCRIPTION')} + + + + +
+
+ ); +} + +export default UnauthorizedPage; diff --git a/apps/web/components/shared/members-card/components/users-card-menu.tsx b/apps/web/components/shared/members-card/components/users-card-menu.tsx index 1a9bbfb21..9b36df2aa 100644 --- a/apps/web/components/shared/members-card/components/users-card-menu.tsx +++ b/apps/web/components/shared/members-card/components/users-card-menu.tsx @@ -49,20 +49,20 @@ function OptionPopover({ setEdit, setEstimateEdit, children }: PropsWithChildren extramenu: true }, { - name: t('task.UNASSIGN_TASK'), + name: t('task.taskLabel.TASK_UNASSIGNED'), handleClick: () => { // }, extramenu: true }, { - name: t('task.MAKE_A_MANAGER'), + name: t('task.taskLabel.TASK_ASSIGNED'), handleClick: () => { // } }, { - name: t('task.MAKE_A_MANAGER'), + name: t('task.taskLabel.WORK_LABEL'), handleClick: () => { // } diff --git a/apps/web/components/ui/svgs/sad-cry.tsx b/apps/web/components/ui/svgs/sad-cry.tsx index 63d2bbd38..0db4a8f91 100644 --- a/apps/web/components/ui/svgs/sad-cry.tsx +++ b/apps/web/components/ui/svgs/sad-cry.tsx @@ -1,21 +1,27 @@ +const SadCry = ({ width, height, fill = '#8C7AE4' }: { width: number; height: number; fill?: string }) => { + return ( + <> + + + + + ); +}; -const SadCry = ({ - width, - height, - fill="#8C7AE4" -}:{ - width: number, - height: number, - fill?: string, -}) => { - return ( - <> - - - - - ) -} +export const LockIcon = ({ width, height, fill = '#8C7AE4' }: { width: number; height: number; fill?: string }) => { + return ( + <> + + + + + ); +}; -export default SadCry; \ No newline at end of file +export default SadCry; diff --git a/apps/web/lib/settings/day-dropdown.tsx b/apps/web/lib/settings/day-dropdown.tsx index 86eaf3ca5..901c49453 100644 --- a/apps/web/lib/settings/day-dropdown.tsx +++ b/apps/web/lib/settings/day-dropdown.tsx @@ -9,7 +9,7 @@ import { DayItem, mapDayItems } from './day-items'; export const DayDropdown = ({ setValue, active }: { setValue: UseFormSetValue; active?: IDay | null }) => { const t = useTranslations(); - const [DayList, setDay] = useState(JSON.parse(t('timer.DAY_LIST'))); + const [DayList, setDay] = useState(JSON.parse(t('pages.taskDetails.DAYS_REMAINING'))); const items: any = useMemo(() => mapDayItems(DayList), [DayList]); diff --git a/apps/web/messages/ar.json b/apps/web/messages/ar.json index 9f1a622de..fb95ec93d 100644 --- a/apps/web/messages/ar.json +++ b/apps/web/messages/ar.json @@ -6,8 +6,8 @@ "REJECT": "رفض", "REJECTED": "مرفوض", "VERIFY": "تحقق", - "TOMORROW" : "غدا", - "YESTERDAY" : "أمس", + "TOMORROW": "غدا", + "YESTERDAY": "أمس", "INVITE": "دعوة", "INVITED": "مدعو", "EXPIRE": "انتهاء الصلاحية", @@ -192,8 +192,8 @@ "CONFIRM_ACCEPT_INVITATION": "هل أنت متأكد من رغبتك في قبول الدعوة؟", "CONFIRM_REJECT_INVITATION": "هل أنت متأكد من رغبتك في رفض الدعوة؟" }, - "kanban":{ - "KANBAN_BOARD":"لوحة كانبان" + "kanban": { + "KANBAN_BOARD": "لوحة كانبان" }, "profile": { "BREADCRUMB": "[\"مهام العضو\"]" @@ -425,6 +425,11 @@ "SELECT_ROLES": "تحديد الأدوار" }, + "unauthorized": { + "TITLE": "غير مصرح", + "HEADING_TITLE": "أنت غير مفوض لدخول هذه الصفحة !", + "HEADING_DESCRIPTION": "عتذر عن الإزعاج، لكن غير مسموح لك بالدخول إلى هذه الصفحة. إذا كنت تعتقد أن هذا خطأ. الرجاء تسجيل الدخول." + }, "page404": { "HEADING_TITLE": "غير موجود", "HEADING_DESCRIPTION": "المورد الذي تبحث عنه غير موجود!", diff --git a/apps/web/messages/bg.json b/apps/web/messages/bg.json index 7bbaa876d..6d2039e1c 100644 --- a/apps/web/messages/bg.json +++ b/apps/web/messages/bg.json @@ -4,8 +4,8 @@ "ACCEPT": "Приемам", "ACCEPTED": "Приет", "REJECT": "Отхвърлям", - "TOMORROW" : "Утре", - "YESTERDAY" : "Вчера", + "TOMORROW": "Утре", + "YESTERDAY": "Вчера", "REJECTED": "Отхвърлен", "VERIFY": "провери", "INVITE": "Покани", @@ -191,8 +191,8 @@ "CONFIRM_ACCEPT_INVITATION": "Сигурни ли сте, че искате да приемете поканата?", "CONFIRM_REJECT_INVITATION": "Сигурни ли сте, че искате да отхвърлите поканата?" }, - "kanban":{ - "KANBAN_BOARD":"Канбан дъска" + "kanban": { + "KANBAN_BOARD": "Канбан дъска" }, "profile": { "BREADCRUMB": "[\"Задачи за член\"]" @@ -429,6 +429,11 @@ "permissions": { "SELECT_ROLES": "Избери роли" }, + "unauthorized": { + "TITLE": "Неразрешено", + "HEADING_TITLE": "Нямате право за достъп до тази страница!", + "HEADING_DESCRIPTION": "Извиняваме се за неудобството, но не сте оторизирани за достъп до тази страница. Ако смятате, че това е грешка. Моля влезте." + }, "page404": { "HEADING_TITLE": "Ненамерено", "HEADING_DESCRIPTION": "Търсеният ресурс не беше намерен!", diff --git a/apps/web/messages/de.json b/apps/web/messages/de.json index f9ac0db86..6d9219cad 100644 --- a/apps/web/messages/de.json +++ b/apps/web/messages/de.json @@ -4,8 +4,8 @@ "ACCEPT": "Akzeptieren", "ACCEPTED": "Akzeptiert", "REJECT": "Ablehnen", - "TOMORROW" : "Morgen", - "YESTERDAY" : "Gestern", + "TOMORROW": "Morgen", + "YESTERDAY": "Gestern", "REJECTED": "Abgelehnt", "VERIFY": "Verifizieren", "INVITE": "Einladen", @@ -193,14 +193,13 @@ "CONFIRM_ACCEPT_INVITATION": "Möchten Sie die Einladung wirklich annehmen?", "CONFIRM_REJECT_INVITATION": "Möchten Sie die Einladung wirklich ablehnen?" }, - "kanban":{ - "KANBAN_BOARD":"Kanban-Board" + "kanban": { + "KANBAN_BOARD": "Kanban-Board" }, "profile": { "BREADCRUMB": "[\"Aufgaben des Mitglieds\"]" }, - "taskDetails": { "BREADCRUMB": "[\"Aufgabendetails\"]", "DESCRIPTION": "Beschreibungen", @@ -423,6 +422,11 @@ "permissions": { "SELECT_ROLES": "Rollen auswählen" }, + "unauthorized": { + "TITLE": "Nicht autorisiert", + "HEADING_TITLE": "Sie sind nicht autorisiert auf diese Seite zuzugreifen !", + "HEADING_DESCRIPTION": "Wir entschuldigen uns für die Unannehmlichkeiten, aber Sie sind nicht berechtigt, auf diese Seite zuzugreifen. Wenn Sie glauben, dass dies ein Fehler ist. Bitte loggen Sie sich ein." + }, "page404": { "HEADING_TITLE": "Nicht gefunden", "HEADING_DESCRIPTION": "Die gesuchte Ressource wurde nicht gefunden!", diff --git a/apps/web/messages/en.json b/apps/web/messages/en.json index 5b4a794b7..c2dacb79c 100644 --- a/apps/web/messages/en.json +++ b/apps/web/messages/en.json @@ -201,8 +201,8 @@ "profile": { "BREADCRUMB": "[\"Member Tasks\"]" }, - "kanban":{ - "KANBAN_BOARD":"Kanban Board" + "kanban": { + "KANBAN_BOARD": "Kanban Board" }, "taskDetails": { @@ -426,6 +426,11 @@ "permissions": { "SELECT_ROLES": "Select Roles" }, + "unauthorized": { + "TITLE": "Unauthorized", + "HEADING_TITLE": "You are not authorized to access this page !", + "HEADING_DESCRIPTION": "We apologize for the inconvenience, but you are not authorized to access to this page. If you believe this is an error. Please login." + }, "page404": { "HEADING_TITLE": "Page not found !", "HEADING_DESCRIPTION": "We looked, but can't find it .... ", diff --git a/apps/web/messages/es.json b/apps/web/messages/es.json index bdd96f2ce..73c252953 100644 --- a/apps/web/messages/es.json +++ b/apps/web/messages/es.json @@ -4,8 +4,8 @@ "ACCEPT": "Aceptar", "ACCEPTED": "Aceptado", "REJECT": "Rechazar", - "TOMORROW" : "Mañana", - "YESTERDAY" : "Ayer", + "TOMORROW": "Mañana", + "YESTERDAY": "Ayer", "REJECTED": "Rechazado", "VERIFY": "verificar", "INVITE": "Invitar", @@ -189,8 +189,8 @@ "CONFIRM_ACCEPT_INVITATION": "¿Estás seguro de que deseas aceptar la invitación?", "CONFIRM_REJECT_INVITATION": "¿Estás seguro de que deseas rechazar la invitación?" }, - "kanban":{ - "KANBAN_BOARD":"tablero kanban" + "kanban": { + "KANBAN_BOARD": "tablero kanban" }, "profile": { "BREADCRUMB": "[\"Tareas de miembro\"]" @@ -401,6 +401,11 @@ "permissions": { "SELECT_ROLES": "Seleccionar roles" }, + "unauthorized": { + "TITLE": "No autorizado", + "HEADING_TITLE": "No tiene permisos para acceder a esta página !", + "HEADING_DESCRIPTION": "Lamentamos las molestias, pero no está autorizado a acceder a esta página. Si crees que esto es un error. Por favor Iniciar sesión." + }, "page404": { "HEADING_TITLE": "No encontrado", "HEADING_DESCRIPTION": "¡El recurso que buscas no se encuentra!", diff --git a/apps/web/messages/fr.json b/apps/web/messages/fr.json index 016f3e860..f564d8ba7 100644 --- a/apps/web/messages/fr.json +++ b/apps/web/messages/fr.json @@ -4,8 +4,8 @@ "ACCEPT": "Accepter", "ACCEPTED": "Accepté", "REJECT": "Rejeter", - "TOMORROW" : "Demain", - "YESTERDAY" : "Hier", + "TOMORROW": "Demain", + "YESTERDAY": "Hier", "REJECTED": "Rejeté", "VERIFY": "Vérifier", "INVITE": "Inviter", @@ -191,8 +191,8 @@ "CONFIRM_ACCEPT_INVITATION": "Êtes-vous sûr de vouloir accepter l'invitation ?", "CONFIRM_REJECT_INVITATION": "Êtes-vous sûr de vouloir refuser l'invitation ?" }, - "kanban":{ - "KANBAN_BOARD":"Tableau Kanban" + "kanban": { + "KANBAN_BOARD": "Tableau Kanban" }, "profile": { "BREADCRUMB": "[\"Tâches du membre\"]" @@ -418,6 +418,11 @@ "permissions": { "SELECT_ROLES": "Sélectionner des rôles" }, + "unauthorized": { + "TITLE": "Non autorisé", + "HEADING_TITLE": "Vous n'êtes pas autorisé à accéder à cette page !", + "HEADING_DESCRIPTION": "Nous nous excusons pour la gêne occasionnée, mais vous n'êtes pas autorisé à accéder à cette page. Si vous pensez que c'est une erreur. Veuillez vous connecter." + }, "page404": { "HEADING_TITLE": "Page non trouvée", "HEADING_DESCRIPTION": "La ressource que vous recherchez est introuvable !", diff --git a/apps/web/messages/he.json b/apps/web/messages/he.json index 875020bcd..6408e5a38 100644 --- a/apps/web/messages/he.json +++ b/apps/web/messages/he.json @@ -4,8 +4,8 @@ "ACCEPT": "קבל", "ACCEPTED": "התקבל", "REJECT": "דחה", - "TOMORROW" : "מחר", - "YESTERDAY" : "אתמול", + "TOMORROW": "מחר", + "YESTERDAY": "אתמול", "REJECTED": "נדחה", "VERIFY": "אמת", "INVITE": "הזמן", @@ -193,8 +193,8 @@ "CONFIRM_ACCEPT_INVITATION": "האם אתה בטוח שברצונך לקבל את ההזמנה?", "CONFIRM_REJECT_INVITATION": "האם אתה בטוח שברצונך לדחות את ההזמנה?" }, - "kanban":{ - "KANBAN_BOARD":"לוח Kanban" + "kanban": { + "KANBAN_BOARD": "לוח Kanban" }, "profile": { "BREADCRUMB": "[\"משימות חבר\"]" @@ -417,6 +417,11 @@ "permissions": { "SELECT_ROLES": "בחר תפקידים" }, + "unauthorized": { + "TITLE": "לא מורשה", + "HEADING_TITLE": "אתה לא מורשה להיכנס לדף זה ", + "HEADING_DESCRIPTION": "אנו מתנצלים על אי הנוחות, אך אינך מורשה לגשת לדף זה. אם אתה מאמין שזו טעות. אנא התחבר" + }, "page404": { "HEADING_TITLE": "לא נמצא", "HEADING_DESCRIPTION": "המשאב שאתה מחפש לא נמצא!", diff --git a/apps/web/messages/it.json b/apps/web/messages/it.json index 90140a8a4..2226f8109 100644 --- a/apps/web/messages/it.json +++ b/apps/web/messages/it.json @@ -4,8 +4,8 @@ "ACCEPT": "Accept", "ACCEPTED": "Accepted", "REJECT": "Reject", - "TOMORROW" :"Domani", - "YESTERDAY" :"Ieri", + "TOMORROW": "Domani", + "YESTERDAY": "Ieri", "REJECTED": "Rifiutato", "VERIFY": "verifica", "INVITE": "Invita", @@ -45,7 +45,7 @@ "UNMAKE_A_MANAGER": "Non fare un manager", "TRANSFERT_OWNERSHIP": "Trasferimento di proprietà", "TRANSFERT_OWNERSHIP_TO": "Trasferisci la piena proprietà del team a un altro utente", - "REMOVE" : "Rimuovi", + "REMOVE": "Rimuovi", "REMOVE_TEAM": "Rimuovi il team", "DISPOSE_TEAM": "Elimina il team", "QUIT_TEAM": "Lascia il team", @@ -124,18 +124,18 @@ "CONTACT": "Contatto", "THEME": "Tema", - "TIME_ZONE": "Fuso Orario", - "EDIT": "Modifica", - "SAVE": "Salva", - "LANGUAGE": "Lingua", - "DETECT": "Rileva", - "TRANSFER": "Trasferisci", - "TRANSFER_TEAM": "Trasferisci Team", - "TEAM_MEMBERS": "Membri del Team", - "NO_TEAM": "Crea il tuo team o unisciti a uno esistente", + "TIME_ZONE": "Fuso Orario", + "EDIT": "Modifica", + "SAVE": "Salva", + "LANGUAGE": "Lingua", + "DETECT": "Rileva", + "TRANSFER": "Trasferisci", + "TRANSFER_TEAM": "Trasferisci Team", + "TEAM_MEMBERS": "Membri del Team", + "NO_TEAM": "Crea il tuo team o unisciti a uno esistente", "NO_TEAM_SUB": "È fantastico lavorare con gli altri, quindi crea un team e invita tutti a collaborare!", "NO_TEAM_TOOLTIP": "È necessario verificare il tuo indirizzo email", - "CANCEL" : "Annulla", + "CANCEL": "Annulla", "DISCARD": "Scarta", "EXISTING_MEMBER": "Già un Membro", "NEW_MEMBER": "Diventa un Membro", @@ -161,14 +161,14 @@ "TASK_INPUT_DISABLED_MESSAGE_WHEN_TIMER_RUNNING": "Si prega di fermare il Timer prima di cambiare il Compito", "COLLABORATE_DIALOG_TITLE": "Inizia Collaborazione", - "COLLABORATE_DIALOG_SUB_TITLE": "Invita membro(i) e inizia a collaborare", - "COLLABORATE_DIALOG_FOOTER_MESSAGE": "Inizia la Riunione o la Collaborazione sulla Bacheca", - "ISSUE_TYPE": "Tipo di Problema", - "ACTIVITY": "Attività", - "FILTER_ALL": "Tutti", - "FILTER_COMMENTS": "Commenti", - "FILTER_HISTORY": "Cronologia", - "FILTER_UNSUBSCRIBE": "Annulla Iscrizione", + "COLLABORATE_DIALOG_SUB_TITLE": "Invita membro(i) e inizia a collaborare", + "COLLABORATE_DIALOG_FOOTER_MESSAGE": "Inizia la Riunione o la Collaborazione sulla Bacheca", + "ISSUE_TYPE": "Tipo di Problema", + "ACTIVITY": "Attività", + "FILTER_ALL": "Tutti", + "FILTER_COMMENTS": "Commenti", + "FILTER_HISTORY": "Cronologia", + "FILTER_UNSUBSCRIBE": "Annulla Iscrizione", "KEYBOARD_SHORTCUTS": "Scorciatoie da Tastiera", @@ -195,8 +195,8 @@ "CONFIRM_ACCEPT_INVITATION": "Sei sicuro di voler accettare l'invito?", "CONFIRM_REJECT_INVITATION": "Sei sicuro di voler rifiutare l'invito?" }, - "kanban":{ - "KANBAN_BOARD":"Tabellone Kanban" + "kanban": { + "KANBAN_BOARD": "Tabellone Kanban" }, "profile": { "BREADCRUMB": "[\"Compiti dei membri\"]" @@ -212,22 +212,22 @@ "START_DATE": "Data di Inizio", "DUE_DATE": "Data di Scadenza", "DAYS_REMAINING": "Giorni Rimasti", - "VERSION": "Versione", - "EPIC": "Epico", - "STATUS": "Stato", - "LABEL": "Etichetta", - "LABELS": "Etichette", - "SIZE": "Dimensione", - "PRIORITY": "Priorità", - "ESTIMATIONS": "Stime", - "PROGRESS": "Progresso", - "TOTAL_TIME": "Tempo Totale", - "TIME_TODAY": "Tempo Oggi", - "TOTAL_GROUP_TIME": "Tempo Totale del Gruppo", - "TIME_REMAINING": "Tempo Rimanente", - "CREATED": "Creato", - "UPDATED": "Aggiornato", - "RESOLVED": "Risolto", + "VERSION": "Versione", + "EPIC": "Epico", + "STATUS": "Stato", + "LABEL": "Etichetta", + "LABELS": "Etichette", + "SIZE": "Dimensione", + "PRIORITY": "Priorità", + "ESTIMATIONS": "Stime", + "PROGRESS": "Progresso", + "TOTAL_TIME": "Tempo Totale", + "TIME_TODAY": "Tempo Oggi", + "TOTAL_GROUP_TIME": "Tempo Totale del Gruppo", + "TIME_REMAINING": "Tempo Rimanente", + "CREATED": "Creato", + "UPDATED": "Aggiornato", + "RESOLVED": "Risolto", "TASK_TITLE_CHARACTER_LIMIT_ERROR_TITLE": "Non è stato possibile aggiornare il Titolo del Compito.", "TASK_TITLE_CHARACTER_LIMIT_ERROR_DESCRIPTION": "Il Titolo del Compito non può superare i 255 caratteri.", @@ -238,18 +238,18 @@ "auth": { "SEND_CODE": "Invia Codice", - "JOIN": "Unisciti", - "UNRECEIVED_CODE": "Non hai ricevuto il codice?", - "JOIN_TEAM": "Unisciti al Team", - "INPUT_INVITE_CODE": "Inserisci il codice di invito.", - "INPUT_INVITE_CODE_DESC": "Inserisci il codice di invito che abbiamo inviato alla tua email.", - "INVALID_INVITE_CODE_MESSAGE": "Codice non valido", - "WELCOME_TEAMS": "Chiarezza in tempo reale, Realtà in tempo reale™.", + "JOIN": "Unisciti", + "UNRECEIVED_CODE": "Non hai ricevuto il codice?", + "JOIN_TEAM": "Unisciti al Team", + "INPUT_INVITE_CODE": "Inserisci il codice di invito.", + "INPUT_INVITE_CODE_DESC": "Inserisci il codice di invito che abbiamo inviato alla tua email.", + "INVALID_INVITE_CODE_MESSAGE": "Codice non valido", + "WELCOME_TEAMS": "Chiarezza in tempo reale, Realtà in tempo reale™.", "COVER_TITLE": "Piattaforma di Gestione del Lavoro e dei Progetti Aperta", "COVER_DESCRIPTION": "Gestione del Lavoro e della Forza Lavoro, Gestione del Tempo, Tracciamento del Tempo, Tracciamento dell'Attività, Tracciamento della Produttività e Metriche, Gestione di Progetti/Compiti e Problemi, Organizzazioni e Team, Integrazioni (GitHub, JIRA, ...) e Altro!", "LOGIN": "Accesso", - "SELECT_WORKSPACE": "Seleziona Spazio di Lavoro", + "SELECT_WORKSPACE": "Seleziona Spazio di Lavoro", "ENTER_EMAIL": "Inserisci l'Email", "WORKSPACES_NOT_FOUND": "Spazi di Lavoro Non Trovati" }, @@ -262,8 +262,8 @@ "HEADING_DESCRIPTION": "Inserisci l'email e il codice di invito per accedere.", "WORKSPACE": "Spazio di Lavoro", - "HEADING_WORKSPACE_LINE1": "L'email è associata a più spazi di lavoro,", - "HEADING_WORKSPACE_LINE2": "seleziona uno per continuare" + "HEADING_WORKSPACE_LINE1": "L'email è associata a più spazi di lavoro,", + "HEADING_WORKSPACE_LINE2": "seleziona uno per continuare" }, "authTeam": { "HEADING_TITLE": "Crea un Nuovo Team", @@ -283,23 +283,23 @@ }, "settingsPersonal": { "HEADING_TITLE": "Impostazioni Generali", - "emailNotValid": "Fornisci un indirizzo email valido", - "phoneNotValid": "Fornisci un numero di telefono valido", - "WORK_SCHEDULE": "Orario di Lavoro", - "SUBSCRIPTION": "Abbonamento", - "ABOUT_TO_CHANGE_EMAIL": "Stai per cambiare l'email", - "ABOUT_TO_DELETE_ACCOUNT": "Stai per eliminare il tuo account?", - "ABOUT_TO_REMOVE_ACCOUNT": "Stai per rimuovere il tuo account?" + "emailNotValid": "Fornisci un indirizzo email valido", + "phoneNotValid": "Fornisci un numero di telefono valido", + "WORK_SCHEDULE": "Orario di Lavoro", + "SUBSCRIPTION": "Abbonamento", + "ABOUT_TO_CHANGE_EMAIL": "Stai per cambiare l'email", + "ABOUT_TO_DELETE_ACCOUNT": "Stai per eliminare il tuo account?", + "ABOUT_TO_REMOVE_ACCOUNT": "Stai per rimuovere il tuo account?" }, "settingsTeam": { "HEADING_TITLE": "Impostazioni Generali", - "MEMBER_HEADING_TITLE": "Membri", - "PRIORITIES_HEADING": "Priorità", - "NOTIFICATION_HEADING": "Notifiche", - "SIZES_HEADING": "Dimensioni", - "TEAM_NAME": "Nome del Team", - "TEAM_TYPE": "Tipo di Team", - "TIME_TRACKING": "Tracciamento del Tempo", + "MEMBER_HEADING_TITLE": "Membri", + "PRIORITIES_HEADING": "Priorità", + "NOTIFICATION_HEADING": "Notifiche", + "SIZES_HEADING": "Dimensioni", + "TEAM_NAME": "Nome del Team", + "TEAM_TYPE": "Tipo di Team", + "TIME_TRACKING": "Tracciamento del Tempo", "ADD_NEW_MEMBER": "Aggiungi nuovo membro", "MANAGE_ASSIGNEES": "Gestisci Assegnatari", @@ -324,14 +324,14 @@ "CREATE_NEW_ISSUE_TYPES": "Crea nuovi Tipi di Problema", "HIDE_PERSONAL_MEMBERS_INFOTMATION": "Nascondi le Informazioni Personali dei Membri", - "POSITION_CUSTOM": "Posizioni personalizzate", - "INVITATION_EXPIRATION": "Scadenza Invito", - "NOTIFY_IF": "Notifica se", - "TEAM_REQUEST": "Richiesta del Team", - "WORK_SCHEDULE": "Orario di Lavoro", - "MEMBER_AND_ROLES": "Membri e Ruoli", - "INTEGRATIONS": "Integrazioni", - "DANDER_ZONES": "Zona Pericolosa", + "POSITION_CUSTOM": "Posizioni personalizzate", + "INVITATION_EXPIRATION": "Scadenza Invito", + "NOTIFY_IF": "Notifica se", + "TEAM_REQUEST": "Richiesta del Team", + "WORK_SCHEDULE": "Orario di Lavoro", + "MEMBER_AND_ROLES": "Membri e Ruoli", + "INTEGRATIONS": "Integrazioni", + "DANDER_ZONES": "Zona Pericolosa", "GITHUB": "GitHub", "GITHUB_INTEGRATION_DESCRIPTION": "Collegati a GitHub e inizia a sincronizzare i problemi di GitHub con il tuo Team", @@ -357,36 +357,36 @@ "ISSUE_HEADING_TITLE": "Impostazioni Problema", "TASK_PRIVACY": "Privacy del Compito", - "MULTIPLE_ASSIGNEES": "Assegnatari Multipli", - "MANUAL_TIME": "Tempo Manuale", - "GROUP_ESTIMATION": "Stima di Gruppo", - "ESTIMATION_IN_HOURS": "Stima in Ore", - "ESTIMATION_IN_STORY_POINTS": "Stima in Punti Storia", - "PROOF_OF_COMPLETION": "Prova di Completamento", - "LINKED_ISSUES": "Problemi Collegati", - "COMMENTS": "Commenti", - "HISTORY": "Cronologia", - "ACCEPTANCE_CRITERIA": "Criteri di Accettazione", - "DRAFT_ISSUES": "Bozze Problemi", - "AUTO_CLOSE_ISSUE": "Chiusura Automatica Problema", - "AUTO_ARCHIVE_ISSUE": "Archiviazione Automatica Problema", - "AUTO_STATUS": "Auto-Status", - "VERSIONS": "Versioni", - "LIST_OF_VERSONS": "Elenco delle Versioni", - "ISSUETYPE": "Tipi di Problema", - "LIST_OF_ISSUES": "Elenco dei Problemi", - "RELATED_ISSUE_TYPE": "Tipi di Problema Collegati", - "LIST_OF_RELATED_TYPE": "Elenco dei Tipi Collegati", - "INITIAL": "Iniziale", - "COPY_NUMBER": "Numero di Copia", - "IN_PROGRESS": "In Corso", - "FINAL": "Finale", - "DISPOSE_TEAM": "Stai per Eliminare il Team?", - "QUIT_TEAM": "Stai per Uscire dal Team?", - "TEAM_COLOR": "Colore del Team", - "TEAM_SIZE": "Dimensione del Team", - "EMOJI": "Emoji", - "ISSUES_HEADING_TITLE": "Impostazioni Problemi", + "MULTIPLE_ASSIGNEES": "Assegnatari Multipli", + "MANUAL_TIME": "Tempo Manuale", + "GROUP_ESTIMATION": "Stima di Gruppo", + "ESTIMATION_IN_HOURS": "Stima in Ore", + "ESTIMATION_IN_STORY_POINTS": "Stima in Punti Storia", + "PROOF_OF_COMPLETION": "Prova di Completamento", + "LINKED_ISSUES": "Problemi Collegati", + "COMMENTS": "Commenti", + "HISTORY": "Cronologia", + "ACCEPTANCE_CRITERIA": "Criteri di Accettazione", + "DRAFT_ISSUES": "Bozze Problemi", + "AUTO_CLOSE_ISSUE": "Chiusura Automatica Problema", + "AUTO_ARCHIVE_ISSUE": "Archiviazione Automatica Problema", + "AUTO_STATUS": "Auto-Status", + "VERSIONS": "Versioni", + "LIST_OF_VERSONS": "Elenco delle Versioni", + "ISSUETYPE": "Tipi di Problema", + "LIST_OF_ISSUES": "Elenco dei Problemi", + "RELATED_ISSUE_TYPE": "Tipi di Problema Collegati", + "LIST_OF_RELATED_TYPE": "Elenco dei Tipi Collegati", + "INITIAL": "Iniziale", + "COPY_NUMBER": "Numero di Copia", + "IN_PROGRESS": "In Corso", + "FINAL": "Finale", + "DISPOSE_TEAM": "Stai per Eliminare il Team?", + "QUIT_TEAM": "Stai per Uscire dal Team?", + "TEAM_COLOR": "Colore del Team", + "TEAM_SIZE": "Dimensione del Team", + "EMOJI": "Emoji", + "ISSUES_HEADING_TITLE": "Impostazioni Problemi", "TRACK_TIME": "Registra Tempo", "ESTIMATE_ISSUE": "Stima Problema", @@ -413,14 +413,19 @@ "INVITE_LABEL_SEND": "Invia Invito", "invitationTable": { "NAME_AND_EMAIL": "Nome ed Email", - "POSITION": "Posizione", - "DATE_AND_TIME_REQUEST": "Richiesta Data e Ora", - "CV_OR_ATTACHMENT": "CV / Allegato" + "POSITION": "Posizione", + "DATE_AND_TIME_REQUEST": "Richiesta Data e Ora", + "CV_OR_ATTACHMENT": "CV / Allegato" } }, "permissions": { "SELECT_ROLES": "Seleziona Ruoli" }, + "unauthorized": { + "TITLE": "Non autorizzato", + "HEADING_TITLE": "Non sei autorizzato ad accedere a questa pagina !", + "HEADING_DESCRIPTION": "Ci scusiamo per il disagio ma non sei autorizzato ad accedere a questa pagina. Se ritieni che questo sia un errore. Accedere prego." + }, "page404": { "HEADING_TITLE": "Non Trovato", "HEADING_DESCRIPTION": "Risorsa non trovata!", @@ -445,23 +450,23 @@ "START_TIMER": "Per favore, seleziona o crea un nuovo compito per iniziare a tracciare il tempo", "TEAM_SWITCH": { "STOPPED_TIMER_TOAST_TITLE": "Timer Fermato", - "STOPPED_TIMER_TOAST_DESCRIPTION": "Il timer è stato fermato a causa del cambio di team" + "STOPPED_TIMER_TOAST_DESCRIPTION": "Il timer è stato fermato a causa del cambio di team" }, "ESTIMATION": { "ESTIMATE_LABEL": "Stima" }, "DAY_LIST": [{ "title": "7 days" }, { "title": "14 days" }], "TIME_ACTIVITY": "Attività", - "TOTAL_HOURS": "Ore Totali", - "NO_SCREENSHOOT": "Nessuna Schermata", - "PERCENT_OF_MINUTES": "% di 10 Minuti", - "APPS": "Applicazioni", - "VISITED_DATES": "Date Visitate", - "PERCENT_USED": "Percentuale Utilizzata", - "TIME_SPENT_IN_HOURS": "Tempo Trascorso (Ore)", - "THERE_IS_NO_APPS_VISITED": "Non ci sono App Visitate.", - "OTHER_DETAILS": "Altri Dettagli", - "KEYBOARD": "Tastiera", + "TOTAL_HOURS": "Ore Totali", + "NO_SCREENSHOOT": "Nessuna Schermata", + "PERCENT_OF_MINUTES": "% di 10 Minuti", + "APPS": "Applicazioni", + "VISITED_DATES": "Date Visitate", + "PERCENT_USED": "Percentuale Utilizzata", + "TIME_SPENT_IN_HOURS": "Tempo Trascorso (Ore)", + "THERE_IS_NO_APPS_VISITED": "Non ci sono App Visitate.", + "OTHER_DETAILS": "Altri Dettagli", + "KEYBOARD": "Tastiera", "MOUSE": "Mouse", "TIMES": "Volte", @@ -494,18 +499,18 @@ }, "taskTableHead": { "TASK_NAME": "Nome", - "TASK_STATUS": "Stato", - "TASK_WORK": { - "TITLE": "Lavorato su", - "DESCRIPTION": "Compito", - "LABEL": "Lavorato su compito" - }, - "TASK_TIME": "Stima", - "TOTAL_WORK": { - "TITLE": "Totale Lavorato", - "DESCRIPTION": "Oggi", - "LABEL": "Totale lavorato oggi" - }, + "TASK_STATUS": "Stato", + "TASK_WORK": { + "TITLE": "Lavorato su", + "DESCRIPTION": "Compito", + "LABEL": "Lavorato su compito" + }, + "TASK_TIME": "Stima", + "TOTAL_WORK": { + "TITLE": "Totale Lavorato", + "DESCRIPTION": "Oggi", + "LABEL": "Totale lavorato oggi" + }, "TOTAL_WORKED_TODAY_HEADER_TOOLTIP": "Quante ore ha lavorato l'impiegato in totale e oggi sul compito", "WORKED_ON_TASK_HEADER_TOOLTIP": "Quante ore ha lavorato l'impiegato oggi su tutte le attività per il team selezionato" }, @@ -522,7 +527,7 @@ "ISSUE_NAME_PLACEHOLDER": "Nome del problema", "TEAM_NAME_PLACEHOLDER": "Inserisci il nome del tuo team", - "TASK_INPUT_PLACEHOLDER": "Su cosa stai lavorando?", + "TASK_INPUT_PLACEHOLDER": "Su cosa stai lavorando?", "TEAM_MEMBER_NAME_PLACEHOLDER": "Nome del membro del team", "TEAM_MEMBER_EMAIL_PLACEHOLDER": "Indirizzo email del membro del team", diff --git a/apps/web/messages/nl.json b/apps/web/messages/nl.json index d9cd07817..e580fc725 100644 --- a/apps/web/messages/nl.json +++ b/apps/web/messages/nl.json @@ -4,8 +4,8 @@ "ACCEPT": "Accepteren", "ACCEPTED": "Geaccepteerd", "REJECT": "Afwijzen", - "TOMORROW" : "Morgen", - "YESTERDAY" : "Gisteren", + "TOMORROW": "Morgen", + "YESTERDAY": "Gisteren", "REJECTED": "Afgewezen", "VERIFY": "verifiëren", "INVITE": "Uitnodigen", @@ -193,8 +193,8 @@ "CONFIRM_ACCEPT_INVITATION": "Weet u zeker dat u de uitnodiging wilt accepteren?", "CONFIRM_REJECT_INVITATION": "Weet u zeker dat u de uitnodiging wilt afwijzen?" }, - "kanban":{ - "KANBAN_BOARD":"Kanban-bord" + "kanban": { + "KANBAN_BOARD": "Kanban-bord" }, "profile": { "BREADCRUMB": "[\"Taken teamlid\"]" @@ -418,8 +418,13 @@ }, "permissions": { "SELECT_ROLES": "Rollen selecteren" - }, - "page404": { + }, + "unauthorized": { + "TITLE": "Ongeautoriseerd", + "HEADING_TITLE": "U heeft geen toegang tot deze pagina!", + "HEADING_DESCRIPTION": "Onze excuses voor het ongemak, maar u heeft geen toegang tot deze pagina. Als u denkt dat dit een fout is. Log alsjeblieft in" + }, + "page404": { "HEADING_TITLE": "Niet gevonden", "HEADING_DESCRIPTION": "De bron die u zoekt is niet gevonden!", "LINK_LABEL": "Naar de startpagina" diff --git a/apps/web/messages/pl.json b/apps/web/messages/pl.json index ee7ba1e98..682000bad 100644 --- a/apps/web/messages/pl.json +++ b/apps/web/messages/pl.json @@ -195,8 +195,8 @@ "CONFIRM_ACCEPT_INVITATION": "Czy na pewno chcesz zaakceptować zaproszenie?", "CONFIRM_REJECT_INVITATION": "Czy na pewno chcesz odrzucić zaproszenie?" }, - "kanban":{ - "KANBAN_BOARD":"Tablica Kanbana" + "kanban": { + "KANBAN_BOARD": "Tablica Kanbana" }, "profile": { "BREADCRUMB": "[\"Member Tasks\"]" @@ -420,6 +420,11 @@ "permissions": { "SELECT_ROLES": "Wybierz Role" }, + "unauthorized": { + "TITLE": "Nieautoryzowany", + "HEADING_TITLE": "Nie masz uprawnień, aby uzyskać dostęp do tej strony !", + "HEADING_DESCRIPTION": "Przepraszamy za niedogodności, ale nie masz uprawnień dostępu do tej strony. Jeśli uważasz, że to błąd. Proszę się zalogować." + }, "page404": { "HEADING_TITLE": "Nie Znaleziono", "HEADING_DESCRIPTION": "Nie znaleziono szukanego zasobu!", diff --git a/apps/web/messages/pt.json b/apps/web/messages/pt.json index 919a99375..940587d02 100644 --- a/apps/web/messages/pt.json +++ b/apps/web/messages/pt.json @@ -421,6 +421,11 @@ "permissions": { "SELECT_ROLES": "Selecionar Funções" }, + "unauthorized": { + "TITLE": "Não autorizado", + "HEADING_TITLE": "Você não está autorizado à acessar essa página !", + "HEADING_DESCRIPTION": "Pedimos desculpas pelo transtorno, mas você não está autorizado a acessar esta página. Se você acredita que isso é um erro. Por favor entre." + }, "page404": { "HEADING_TITLE": "Não Encontrado", "HEADING_DESCRIPTION": "Recurso que você está procurando não foi encontrado!", diff --git a/apps/web/messages/ru.json b/apps/web/messages/ru.json index df9851fba..d25063524 100644 --- a/apps/web/messages/ru.json +++ b/apps/web/messages/ru.json @@ -195,8 +195,8 @@ "CONFIRM_ACCEPT_INVITATION": "Вы уверены, что хотите принять приглашение?", "CONFIRM_REJECT_INVITATION": "Вы уверены, что хотите отклонить приглашение?" }, - "kanban":{ - "KANBAN_BOARD":"Канбан-доска" + "kanban": { + "KANBAN_BOARD": "Канбан-доска" }, "profile": { "BREADCRUMB": "[\"Member Tasks\"]" @@ -421,6 +421,11 @@ "permissions": { "SELECT_ROLES": "Выберите роли" }, + "unauthorized": { + "TITLE": "Несанкционированный", + "HEADING_TITLE": "Вы не авторизованы для просмотра этой страницы !", + "HEADING_DESCRIPTION": "Приносим извинения за неудобства, но у вас нет прав доступа к этой странице. Если вы считаете, что это ошибка. Пожалуйста, войдите." + }, "page404": { "HEADING_TITLE": "Не найдено", "HEADING_DESCRIPTION": "Ресурс, который вы ищете, не найден!", @@ -510,7 +515,6 @@ "WORKED_ON_TASK_HEADER_TOOLTIP": "Сколько часов сотрудник поработал сегодня по всем задачам для выбранной команды" }, "CONFIRM_CLOSE_TASK": "Пожалуйста, подтвердите, что вы хотите закрыть задачу" - }, "form": { diff --git a/apps/web/messages/zh.json b/apps/web/messages/zh.json index 7df2b52e6..88ea027b1 100644 --- a/apps/web/messages/zh.json +++ b/apps/web/messages/zh.json @@ -193,8 +193,8 @@ "CONFIRM_ACCEPT_INVITATION": "您确定要接受邀请吗?", "CONFIRM_REJECT_INVITATION": "您确定要拒绝邀请吗?" }, - "kanban":{ - "KANBAN_BOARD":"看板" + "kanban": { + "KANBAN_BOARD": "看板" }, "profile": { "BREADCRUMB": "[\"成员任务\"]" @@ -245,7 +245,7 @@ "WELCOME_TEAMS": "欢迎使用永恒团队", "COVER_TITLE": "实时跟踪您团队的工作进度!", - "COVER_DESCRIPTION" : "一站式工作和人力管理,时间管理,时间跟踪,活动跟踪,生产力跟踪和指标,项目/任务和问题管理,组织和团队,集成(GitHub,JIRA,...)等等!", + "COVER_DESCRIPTION": "一站式工作和人力管理,时间管理,时间跟踪,活动跟踪,生产力跟踪和指标,项目/任务和问题管理,组织和团队,集成(GitHub,JIRA,...)等等!", "LOGIN": "登录", "SELECT_WORKSPACE": "选择工作区", "ENTER_EMAIL": "输入电子邮箱", @@ -401,6 +401,11 @@ "NO_INVITATIONS": "目前没有邀请!", "NO_MEMBERS": "目前没有成员!" }, + "unauthorized": { + "TITLE": "未經授權", + "HEADING_TITLE": "您無權訪問此頁面 !", + "HEADING_DESCRIPTION": "對於造成您的不便,我們深表歉意,但您無權造訪此頁面。 如果您認為這是一個錯誤。 請登入。" + }, "offline": { "HEADING_TITLE": "网络断开连接!", "HEADING_DESCRIPTION": "您目前处于离线状态,请检查您的互联网连接..." diff --git a/apps/web/middleware.ts b/apps/web/middleware.ts index 0e876aa0a..4b939b510 100644 --- a/apps/web/middleware.ts +++ b/apps/web/middleware.ts @@ -23,7 +23,8 @@ export const config = { '/task(.*)', '/meet(.*)', '/board(.*)', - '/kanban(.*)' + '/kanban(.*)', + '/unauthorized(.*)' ] }; @@ -65,8 +66,9 @@ export async function middleware(request: NextRequest) { const url = new URL(request.url); - const deny_redirect = () => { - response = NextResponse.redirect(url.origin + DEFAULT_APP_PATH, {}); + const deny_redirect = (defaultRoute: boolean) => { + const redirectToPassCode = defaultRoute || url.pathname == DEFAULT_MAIN_PATH; + response = NextResponse.redirect(url.origin + (redirectToPassCode ? DEFAULT_APP_PATH : '/unauthorized')); cookiesKeys().forEach((key) => { response.cookies.set(key, ''); }); @@ -78,17 +80,17 @@ export async function middleware(request: NextRequest) { }); if ((protected_path && !refresh_token) || (protected_path && !access_token)) { - deny_redirect(); + deny_redirect(false); // Next condition, if all tokens are presents } else if (protected_path && access_token) { const res = await currentAuthenticatedUserRequest({ bearer_token: access_token }).catch(() => { - deny_redirect(); + deny_redirect(true); }); if (!res || !res.response.ok) { - deny_redirect(); + deny_redirect(true); } else { response.headers.set('x-user', JSON.stringify(res.data)); } diff --git a/apps/web/public/locales/ar/common.json b/apps/web/public/locales/ar/common.json index 43af67417..cf99bacdf 100644 --- a/apps/web/public/locales/ar/common.json +++ b/apps/web/public/locales/ar/common.json @@ -422,6 +422,11 @@ "SELECT_ROLES": "تحديد الأدوار" }, + "unauthorized": { + "TITLE": "غير مصرح", + "HEADING_TITLE": "أنت غير مفوض لدخول هذه الصفحة", + "HEADING_DESCRIPTION": "نعتذر عن الإزعاج، لكن غير مسموح لك بالدخول إلى هذه الصفحة. إذا كنت تعتقد أن هذا خطأ. الرجاء تسجيل الدخول." + }, "page404": { "HEADING_TITLE": "غير موجود", "HEADING_DESCRIPTION": "المورد الذي تبحث عنه غير موجود!", diff --git a/apps/web/public/locales/bg/common.json b/apps/web/public/locales/bg/common.json index 34063e44e..949e26f86 100644 --- a/apps/web/public/locales/bg/common.json +++ b/apps/web/public/locales/bg/common.json @@ -427,6 +427,11 @@ "permissions": { "SELECT_ROLES": "Избери роли" }, + "unauthorized": { + "TITLE": "Неразрешено", + "HEADING_TITLE": "Нямате право за достъп до тази страница!", + "HEADING_DESCRIPTION": "Извиняваме се за неудобството, но не сте оторизирани за достъп до тази страница. Ако смятате, че това е грешка. Моля влезте." + }, "page404": { "HEADING_TITLE": "Ненамерено", "HEADING_DESCRIPTION": "Търсеният ресурс не беше намерен!", diff --git a/apps/web/public/locales/de/common.json b/apps/web/public/locales/de/common.json index 551cac721..ff9b14db5 100644 --- a/apps/web/public/locales/de/common.json +++ b/apps/web/public/locales/de/common.json @@ -418,6 +418,11 @@ "permissions": { "SELECT_ROLES": "Rollen auswählen" }, + "unauthorized": { + "TITLE": "Nicht autorisiert", + "HEADING_TITLE": "Sie sind nicht autorisiert auf diese Seite zuzugreifen !", + "HEADING_DESCRIPTION": "Wir entschuldigen uns für die Unannehmlichkeiten, aber Sie sind nicht berechtigt, auf diese Seite zuzugreifen. Wenn Sie glauben, dass dies ein Fehler ist. Bitte loggen Sie sich ein." + }, "page404": { "HEADING_TITLE": "Nicht gefunden", "HEADING_DESCRIPTION": "Die gesuchte Ressource wurde nicht gefunden!", diff --git a/apps/web/public/locales/en/common.json b/apps/web/public/locales/en/common.json index 08d88365f..0edbf76e5 100644 --- a/apps/web/public/locales/en/common.json +++ b/apps/web/public/locales/en/common.json @@ -423,6 +423,11 @@ "permissions": { "SELECT_ROLES": "Select Roles" }, + "unauthorized": { + "TITLE": "Unauthorized", + "HEADING_TITLE": "You are not authorized to access this page !", + "HEADING_DESCRIPTION": "We apologize for the inconvenience, but you are not authorized to access to this page. If you believe this is an error. Please login." + }, "page404": { "HEADING_TITLE": "Page not found !", "HEADING_DESCRIPTION": "We looked, but can't find it .... ", diff --git a/apps/web/public/locales/es/common.json b/apps/web/public/locales/es/common.json index 75c2afb26..19aedbdb2 100644 --- a/apps/web/public/locales/es/common.json +++ b/apps/web/public/locales/es/common.json @@ -402,6 +402,11 @@ "permissions": { "SELECT_ROLES": "Seleccionar roles" }, + "unauthorized": { + "TITLE": "No autorizado", + "HEADING_TITLE": "No tiene permisos para acceder a esta página !", + "HEADING_DESCRIPTION": "Lamentamos las molestias, pero no está autorizado a acceder a esta página. Si crees que esto es un error. Por favor Iniciar sesión." + }, "page404": { "HEADING_TITLE": "No encontrado", "HEADING_DESCRIPTION": "¡El recurso que buscas no se encuentra!", diff --git a/apps/web/public/locales/fr/common.json b/apps/web/public/locales/fr/common.json index 67102f9eb..741fe0df1 100644 --- a/apps/web/public/locales/fr/common.json +++ b/apps/web/public/locales/fr/common.json @@ -413,6 +413,11 @@ "permissions": { "SELECT_ROLES": "Sélectionner des rôles" }, + "unauthorized": { + "TITLE": "Non autorisé", + "HEADING_TITLE": "Vous n'êtes pas autorisé à accéder à cette page !", + "HEADING_DESCRIPTION": "Nous nous excusons pour la gêne occasionnée, mais vous n'êtes pas autorisé à accéder à cette page. Si vous pensez que c'est une erreur. Veuillez vous connecter." + }, "page404": { "HEADING_TITLE": "Page non trouvée", "HEADING_DESCRIPTION": "La ressource que vous recherchez est introuvable !", diff --git a/apps/web/public/locales/he/common.json b/apps/web/public/locales/he/common.json index 19da9f2d2..3c3f3b89b 100644 --- a/apps/web/public/locales/he/common.json +++ b/apps/web/public/locales/he/common.json @@ -413,6 +413,11 @@ "permissions": { "SELECT_ROLES": "בחר תפקידים" }, + "unauthorized": { + "TITLE": "לא מורשה", + "HEADING_TITLE": "אתה לא מורשה להיכנס לדף זה ", + "HEADING_DESCRIPTION": "אנו מתנצלים על אי הנוחות, אך אינך מורשה לגשת לדף זה. אם אתה מאמין שזו טעות. אנא התחבר" + }, "page404": { "HEADING_TITLE": "לא נמצא", "HEADING_DESCRIPTION": "המשאב שאתה מחפש לא נמצא!", diff --git a/apps/web/public/locales/it/common.json b/apps/web/public/locales/it/common.json index 78ced5d84..f6a23a59b 100644 --- a/apps/web/public/locales/it/common.json +++ b/apps/web/public/locales/it/common.json @@ -417,6 +417,11 @@ "permissions": { "SELECT_ROLES": "Select Roles" }, + "unauthorized": { + "TITLE": "Non autorizzato", + "HEADING_TITLE": "Non sei autorizzato ad accedere a questa pagina !", + "HEADING_DESCRIPTION": "Ci scusiamo per il disagio ma non sei autorizzato ad accedere a questa pagina. Se ritieni che questo sia un errore. Accedere prego." + }, "page404": { "HEADING_TITLE": "Not Found", "HEADING_DESCRIPTION": "Resource you are looking for not found!", diff --git a/apps/web/public/locales/nl/common.json b/apps/web/public/locales/nl/common.json index 7a1bb0209..4a7b8a329 100644 --- a/apps/web/public/locales/nl/common.json +++ b/apps/web/public/locales/nl/common.json @@ -415,6 +415,11 @@ "permissions": { "SELECT_ROLES": "Select Roles" }, + "unauthorized": { + "TITLE": "Ongeautoriseerd", + "HEADING_TITLE": "U heeft geen toegang tot deze pagina!", + "HEADING_DESCRIPTION": "Onze excuses voor het ongemak, maar u heeft geen toegang tot deze pagina. Als u denkt dat dit een fout is. Log alsjeblieft in" + }, "page404": { "HEADING_TITLE": "Not Found", "HEADING_DESCRIPTION": "Resource you are looking for not found!", diff --git a/apps/web/public/locales/pl/common.json b/apps/web/public/locales/pl/common.json index 119fbfc26..ca0c9965e 100644 --- a/apps/web/public/locales/pl/common.json +++ b/apps/web/public/locales/pl/common.json @@ -417,6 +417,11 @@ "permissions": { "SELECT_ROLES": "Select Roles" }, + "unauthorized": { + "TITLE": "Nieautoryzowany", + "HEADING_TITLE": "Nie masz uprawnień, aby uzyskać dostęp do tej strony !", + "HEADING_DESCRIPTION": "Przepraszamy za niedogodności, ale nie masz uprawnień dostępu do tej strony. Jeśli uważasz, że to błąd. Proszę się zalogować." + }, "page404": { "HEADING_TITLE": "Not Found", "HEADING_DESCRIPTION": "Resource you are looking for not found!", diff --git a/apps/web/public/locales/pt/common.json b/apps/web/public/locales/pt/common.json index 9117cfaaf..60042f62b 100644 --- a/apps/web/public/locales/pt/common.json +++ b/apps/web/public/locales/pt/common.json @@ -417,6 +417,11 @@ "permissions": { "SELECT_ROLES": "Select Roles" }, + "unauthorized": { + "TITLE": "Não autorizado", + "HEADING_TITLE": "Você não está autorizado à acessar essa página !", + "HEADING_DESCRIPTION": "Pedimos desculpas pelo transtorno, mas você não está autorizado a acessar esta página. Se você acredita que isso é um erro. Por favor entre." + }, "page404": { "HEADING_TITLE": "Not Found", "HEADING_DESCRIPTION": "Resource you are looking for not found!", diff --git a/apps/web/public/locales/ru/common.json b/apps/web/public/locales/ru/common.json index 4d594e3a6..449a92f94 100644 --- a/apps/web/public/locales/ru/common.json +++ b/apps/web/public/locales/ru/common.json @@ -416,6 +416,11 @@ "permissions": { "SELECT_ROLES": "Select Roles" }, + "unauthorized": { + "TITLE": "Несанкционированный", + "HEADING_TITLE": "Вы не авторизованы для просмотра этой страницы !", + "HEADING_DESCRIPTION": "Приносим извинения за неудобства, но у вас нет прав доступа к этой странице. Если вы считаете, что это ошибка. Пожалуйста, войдите." + }, "page404": { "HEADING_TITLE": "Not Found", "HEADING_DESCRIPTION": "Resource you are looking for not found!", diff --git a/apps/web/public/locales/zh/common.json b/apps/web/public/locales/zh/common.json index ec79e3a88..c6e7d8460 100644 --- a/apps/web/public/locales/zh/common.json +++ b/apps/web/public/locales/zh/common.json @@ -397,6 +397,11 @@ "NO_INVITATIONS": "目前没有邀请!", "NO_MEMBERS": "目前没有成员!" }, + "unauthorized": { + "TITLE": "未經授權", + "HEADING_TITLE": "您無權訪問此頁面 !", + "HEADING_DESCRIPTION": "對於造成您的不便,我們深表歉意,但您無權造訪此頁面。 如果您認為這是一個錯誤。 請登入。" + }, "offline": { "HEADING_TITLE": "网络断开连接!", "HEADING_DESCRIPTION": "您目前处于离线状态,请检查您的互联网连接..."