From d314694773e6408645d1e1a0e471b0c872be4604 Mon Sep 17 00:00:00 2001 From: ISMAIL MASSERAN Date: Sun, 25 Oct 2026 11:15:09 +0800 Subject: [PATCH] DONE: fix issue email redirect to localhost, move action button in user to first column, update cicd --- docker/Dockerfile | 2 +- pnpm-workspace.yaml | 2 ++ src/modules/user/pages/UserList.vue | 4 ++-- src/modules/user/pages/UserProfileTab.vue | 26 +++++++++++++++++------ 4 files changed, 25 insertions(+), 9 deletions(-) create mode 100644 pnpm-workspace.yaml diff --git a/docker/Dockerfile b/docker/Dockerfile index 39a3ab4..d651ba4 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,7 +1,7 @@ # Stage 1: Build Vue SPA FROM node:22 AS builder WORKDIR /app -COPY fe/package*.json fe/pnpm-lock.yaml fe/.npmrc ./ +COPY fe/package*.json fe/pnpm-lock.yaml fe/.npmrc fe/pnpm-workspace.yaml ./ # Skip prepare (cypress install); rebuild esbuild only — required for Vite RUN npm install -g pnpm && \ pnpm install --frozen-lockfile --ignore-scripts && \ diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml new file mode 100644 index 0000000..5ed0b5a --- /dev/null +++ b/pnpm-workspace.yaml @@ -0,0 +1,2 @@ +allowBuilds: + esbuild: true diff --git a/src/modules/user/pages/UserList.vue b/src/modules/user/pages/UserList.vue index 3d40073..9e4cfec 100644 --- a/src/modules/user/pages/UserList.vue +++ b/src/modules/user/pages/UserList.vue @@ -317,6 +317,7 @@ async function confirmRestore() { const headers: TableHeader[] = [ { title: 'Bil.', key: '#', sortable: false }, + { title: 'Tindakan', key: 'actions', sortable: false }, { title: 'Name', key: 'name', sortable: true }, { title: 'Unit', @@ -345,12 +346,12 @@ const headers: TableHeader[] = [ exportValue: (item) => formatUserRoles(item.roles), }, { title: 'Status', key: 'status', sortable: true }, - { title: 'Tindakan', key: 'actions', sortable: false }, ] // deleted users table headers const deletedHeaders: TableHeader[] = [ { title: 'Bil.', key: '#', sortable: false }, + { title: 'Tindakan', key: 'actions', sortable: false }, { title: 'Name', key: 'name', sortable: true }, { title: 'Unit', @@ -368,7 +369,6 @@ const deletedHeaders: TableHeader[] = [ }, { title: 'Status', key: 'status', sortable: true }, { title: 'Dipadam Pada', key: 'deleted_at', sortable: true }, - { title: 'Tindakan', key: 'actions', sortable: false }, ] const { diff --git a/src/modules/user/pages/UserProfileTab.vue b/src/modules/user/pages/UserProfileTab.vue index a1aa3e8..d285be6 100644 --- a/src/modules/user/pages/UserProfileTab.vue +++ b/src/modules/user/pages/UserProfileTab.vue @@ -5,6 +5,7 @@ import { Box } from '@/components/ui/box' import { Field, FieldGroup, FieldLabel } from '@/components/ui/field' import { Input } from '@/components/ui/input' import type { Address } from '@/modules/profile/types/address.types' +import type { Heir } from '@/modules/profile/types/heir.types' import type { UserDetail } from '../types/user.types' const props = defineProps<{ @@ -31,6 +32,8 @@ const statusLabel = computed(() => { const roleNames = computed(() => props.user.roles?.map((role) => role.name).join(', ') || '-') +const heirs = computed(() => props.user.heirs ?? []) + function formatDate(value: string | null | undefined): string { if (!value) return '-' return value.slice(0, 10) @@ -157,19 +160,30 @@ function formatAddressLine(address: Address) {

Penama

-

Senarai penama pengguna.

+

Paparan maklumat penama anggota (baca sahaja).

-
-
+
+
{{ heir.name }} Utama {{ heir.relationship }}
-

{{ heir.ic_number }}

-

{{ heir.phone_number }}

-

{{ heir.address }}

+
+
+
No. Kad Pengenalan
+
{{ heir.ic_number || '-' }}
+
+
+
No. Telefon
+
{{ heir.phone_number || '-' }}
+
+
+
Alamat
+
{{ heir.address || '-' }}
+
+