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

@@ -45,8 +45,8 @@ export function useLocaleTimeAgo(date: Date) {
const I18N_MESSAGES: UseTimeAgoMessages<UseTimeAgoUnitNamesDefault> = {
justNow: t("components.global.date_time.just-now"),
past: (n) => (n.match(/\d/) ? t("components.global.date_time.ago", [n]) : n),
future: (n) => (n.match(/\d/) ? t("components.global.date_time.in", [n]) : n),
past: n => (n.match(/\d/) ? t("components.global.date_time.ago", [n]) : n),
future: n => (n.match(/\d/) ? t("components.global.date_time.in", [n]) : n),
month: (n, past) =>
n === 1
? past
@@ -71,17 +71,9 @@ export function useLocaleTimeAgo(date: Date) {
? t("components.global.date_time.last-week")
: t("components.global.date_time.next-week")
: `${n} ${t(`components.global.date_time.weeks`)}`,
hour: (n) => `${n} ${
n === 1 ? t("components.global.date_time.hour") : t("components.global.date_time.hours")
}`,
minute: (n) => `${n} ${
n === 1 ? t("components.global.date_time.minute") : t("components.global.date_time.minutes")
}`,
second: (n) => `${n} ${
n === 1
? t("components.global.date_time.second")
: t("components.global.date_time.seconds")
}`,
hour: n => `${n} ${n === 1 ? t("components.global.date_time.hour") : t("components.global.date_time.hours")}`,
minute: n => `${n} ${n === 1 ? t("components.global.date_time.minute") : t("components.global.date_time.minutes")}`,
second: n => `${n} ${n === 1 ? t("components.global.date_time.second") : t("components.global.date_time.seconds")}`,
invalid: "",
};
@@ -91,10 +83,7 @@ export function useLocaleTimeAgo(date: Date) {
});
}
export function fmtDate(
value: string | Date,
fmt: DateTimeFormat = "human"
): string {
export function fmtDate(value: string | Date, fmt: DateTimeFormat = "human"): string {
const months = [
"January",
"February",