diff --git a/src/locales/en.json b/src/locales/en.json index 8538caba6..16db6fb2a 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -253,9 +253,10 @@ "will be removed from your dashboard. This action cannot be undone.": "{ productName } will be removed from your dashboard.{ space } This action cannot be undone.", "Worn Display": "Worn Display", "This order will be removed from your dashboard. This action cannot be undone.": "This order will be removed from your dashboard.{ space } This action cannot be undone.", - "Update notification preferences": "Update notification preferences", + "Unable to login. User is not associated with any facility": "Unable to login. User is not associated with any facility", "units": "{ item } units", "unit": "{ item } unit", + "Update notification preferences": "Update notification preferences", "Verify that the items in the package are valid and the customer has received their order. Once the order is handed over to the customer it cannot be undone.": "Verify that the items in the package are valid and the customer has received their order.{ space }Once the order is handed over to the customer it cannot be undone.", "View shipping orders along with pickup orders.": "View shipping orders along with pickup orders.", "You do not have permission to access this page": "You do not have permission to access this page", diff --git a/src/locales/es.json b/src/locales/es.json index 4843ab488..f0dac653c 100644 --- a/src/locales/es.json +++ b/src/locales/es.json @@ -251,9 +251,10 @@ "will be removed from your dashboard. This action cannot be undone.": "{ productName } se eliminará de su panel de control.{ space } Esta acción no se puede deshacer.", "Worn Display": "Pantalla desgastada", "This order will be removed from your dashboard. This action cannot be undone.": "Este pedido será eliminado de tu panel de control.{ space } Esta acción no se puede deshacer.", - "Update notification preferences": "Actualizar preferencias de notificación", + "Unable to login. User is not associated with any facility": "Unable to login. User is not associated with any facility", "units": "{ item } units", "unit": "{ item } unit", + "Update notification preferences": "Actualizar preferencias de notificación", "Verify that the items in the package are valid and the customer has received their order. Once the order is handed over to the customer it cannot be undone.": "Verify that the items in the package are valid and the customer has received their order.{ space }Once the order is handed over to the customer it cannot be undone.", "View shipping orders along with pickup orders.": "Ver órdenes de envío junto con órdenes de recogida.", "You do not have permission to access this page": "No tienes permiso para acceder a esta página", diff --git a/src/locales/ja.json b/src/locales/ja.json index bbed973e0..0d68bb0da 100644 --- a/src/locales/ja.json +++ b/src/locales/ja.json @@ -235,6 +235,7 @@ "Total": "Total", "Track Pickers": "受取人の追跡", "Track who picked orders by entering picker IDs when packing an order.": "注文を梱包する際に受取人IDを入力することで、誰が注文を受け取ったかを追跡できます。", + "Unable to login. User is not associated with any facility": "Unable to login. User is not associated with any facility", "Unable to open as browser is blocking pop-ups.": "ブラウザーがポップアップをブロックしているため、{documentName} を開くことができません。", "Unfillable Items": "記入不可の項目", "Update time zone": "タイムゾーンを更新する", diff --git a/src/store/modules/user/actions.ts b/src/store/modules/user/actions.ts index 3816984a0..ba8c12abd 100644 --- a/src/store/modules/user/actions.ts +++ b/src/store/modules/user/actions.ts @@ -70,6 +70,8 @@ const actions: ActionTree = { //fetching user facilities const isAdminUser = appPermissions.some((appPermission: any) => appPermission?.action === "APP_STOREFULFILLMENT_ADMIN" ); const facilities = await useUserStore().getUserFacilities(userProfile?.partyId, "PICKUP", isAdminUser) + if(!facilities.length) throw "Unable to login. User is not associated with any facility" + await useUserStore().getFacilityPreference('SELECTED_FACILITY') userProfile.facilities = facilities;