Get front end tests passing (#299)

* chore: get front end tests passing

* chore: add @vue/runtime-core to fix types for $t

* chore: sort lockfile

* Discard changes to frontend/pnpm-lock.yaml

* chore: sort lockfile

* chore: fix some type errors

* chore: switch from nuxi typecheck to vue-tsc to force a known good version

* chore: linting

* chore: update pnpm version in frontend test

* feat: add proper pagination type (need to sort why it still doesn't work)

* chore: format imports and initialize totalPrice in label page to null when no label is present

* chore: update pnpm to v9.12.2, merge ItemSummaryPaginationResult with PaginationResult, and handle error in label generator more gracefully

* chore: lint

---------

Co-authored-by: Matt Kilgore <matthew@kilgore.dev>
This commit is contained in:
Tonya
2024-10-28 19:47:00 +00:00
committed by GitHub
parent c0860fc9ca
commit ec5b6bb8ff
31 changed files with 237 additions and 160 deletions

View File

@@ -8,7 +8,6 @@
import MdiFill from "~icons/mdi/fill";
import MdiPencil from "~icons/mdi/pencil";
import MdiAccountMultiple from "~icons/mdi/account-multiple";
import { useI18n } from "vue-i18n";
definePageMeta({
middleware: ["auth"],
@@ -20,7 +19,6 @@ import { useI18n } from "vue-i18n";
const api = useUserApi();
const confirm = useConfirm();
const notify = useNotifier();
const { t } = useI18n();
const currencies = computedAsync(async () => {
const resp = await api.group.currencies();
@@ -378,8 +376,15 @@ import { useI18n } from "vue-i18n";
<label class="label">
<span class="label-text">{{ $t("profile.language") }}</span>
</label>
<select v-model="$i18n.locale" @change="(event) => {setLanguage((event.target as HTMLSelectElement).value )}"
class="select select-bordered">
<select
v-model="$i18n.locale"
class="select select-bordered"
@change="
event => {
setLanguage((event.target as HTMLSelectElement).value);
}
"
>
<option v-for="lang in $i18n.availableLocales" :key="lang" :value="lang">
{{ $t(`languages.${lang}`) }} ({{ $t(`languages.${lang}`, 1, { locale: lang }) }})
</option>
@@ -447,7 +452,7 @@ import { useI18n } from "vue-i18n";
<div v-if="group && currencies && currencies.length > 0" class="p-5 pt-0">
<FormSelect v-model="currency" :label="$t('profile.currency_format')" :items="currencies" />
<p class="m-2 text-sm">{{$t("profile.example")}}: {{ currencyExample }}</p>
<p class="m-2 text-sm">{{ $t("profile.example") }}: {{ currencyExample }}</p>
<div class="mt-4">
<BaseButton size="sm" @click="updateGroup"> {{ $t("profile.update_group") }} </BaseButton>