diff --git a/app/javascript/dashboard/components-next/captain/PageLayout.vue b/app/javascript/dashboard/components-next/captain/PageLayout.vue index 19303ba01..d9fce9e0f 100644 --- a/app/javascript/dashboard/components-next/captain/PageLayout.vue +++ b/app/javascript/dashboard/components-next/captain/PageLayout.vue @@ -2,6 +2,7 @@ import { ref, computed } from 'vue'; import { OnClickOutside } from '@vueuse/components'; import { useRoute } from 'vue-router'; +import { useI18n } from 'vue-i18n'; import { useMapGetter } from 'dashboard/composables/store.js'; import { usePolicy } from 'dashboard/composables/usePolicy'; import Button from 'dashboard/components-next/button/Button.vue'; @@ -69,6 +70,8 @@ const props = defineProps({ const emit = defineEmits(['click', 'close', 'update:currentPage']); +const { t } = useI18n(); + const route = useRoute(); const { shouldShowPaywall } = usePolicy(); @@ -76,14 +79,16 @@ const showAssistantSwitcherDropdown = ref(false); const createAssistantDialogRef = ref(null); const assistants = useMapGetter('captainAssistants/getRecords'); +const uiFlags = useMapGetter('captainAssistants/getUIFlags'); const currentAssistantId = computed(() => route.params.assistantId); +const isFetchingAssistants = computed(() => uiFlags.value?.fetchingList); const activeAssistantName = computed(() => { return ( assistants.value?.find( assistant => assistant.id === Number(currentAssistantId.value) - )?.name || '' + )?.name || t('CAPTAIN.ASSISTANT_SWITCHER.NEW_ASSISTANT') ); }); @@ -118,15 +123,18 @@ const handleCreateAssistant = () => { >
+ {{ t('CAPTAIN.ASSISTANT_SWITCHER.EMPTY_LIST') }} +
+