diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000..6e16f543 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,30 @@ +# top-most EditorConfig file +root = true + +# Default settings for all files +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +indent_style = space +indent_size = 2 +trim_trailing_whitespace = true + +# For Markdown files, don't trim trailing whitespace (karena kadang dipakai untuk line break) +[*.md] +trim_trailing_whitespace = false + +# For JSON, YAML, and config files +[*.{json,yml,yaml}] +indent_style = space +indent_size = 2 + +# For JS, TS, Vue files +[*.{js,ts,vue}] +indent_style = space +indent_size = 2 + +# For CSS, SCSS, PostCSS +[*.{css,scss,pcss}] +indent_style = space +indent_size = 2 diff --git a/.env.example b/.env.example new file mode 100644 index 00000000..884ee1fb --- /dev/null +++ b/.env.example @@ -0,0 +1,4 @@ +NUXT_MAIN_API_ORIGIN= +NUXT_BPJS_API_ORIGIN= +NUXT_SYNC_API_ORIGIN= +NUXT_API_ORIGIN= diff --git a/.gitignore b/.gitignore index 436290c0..a3d94e0b 100644 --- a/.gitignore +++ b/.gitignore @@ -25,4 +25,4 @@ logs # editor .vscode -*.swp \ No newline at end of file +*.swp diff --git a/.prettierrc.json b/.prettierrc.json new file mode 100644 index 00000000..bff36007 --- /dev/null +++ b/.prettierrc.json @@ -0,0 +1,11 @@ +{ + "useTabs": false, + "tabWidth": 2, + "singleQuote": true, + "trailingComma": "all", + "printWidth": 120, + "semi": false, + "plugins": ["prettier-plugin-tailwindcss"], + "htmlWhitespaceSensitivity": "ignore", + "singleAttributePerLine": true +} diff --git a/README-nuxt.md b/README-nuxt.md new file mode 100644 index 00000000..25b58212 --- /dev/null +++ b/README-nuxt.md @@ -0,0 +1,75 @@ +# Nuxt Minimal Starter + +Look at the [Nuxt documentation](https://nuxt.com/docs/getting-started/introduction) to learn more. + +## Setup + +Make sure to install dependencies: + +```bash +# npm +npm install + +# pnpm +pnpm install + +# yarn +yarn install + +# bun +bun install +``` + +## Development Server + +Start the development server on `http://localhost:3000`: + +```bash +# npm +npm run dev + +# pnpm +pnpm dev + +# yarn +yarn dev + +# bun +bun run dev +``` + +## Production + +Build the application for production: + +```bash +# npm +npm run build + +# pnpm +pnpm build + +# yarn +yarn build + +# bun +bun run build +``` + +Locally preview production build: + +```bash +# npm +npm run preview + +# pnpm +pnpm preview + +# yarn +yarn preview + +# bun +bun run preview +``` + +Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information. diff --git a/README.md b/README.md index 5e582ddb..45e4a4e5 100644 --- a/README.md +++ b/README.md @@ -2,4 +2,111 @@ RSSA - Front End -If you see this, the development is still not merged yet. Please check nother branches. +> [!IMPORTANT] +> Read this following instructions before doing your job + +## Framework Guide + +- [Vue Style Guide](https://vuejs.org/style-guide) +- [Nuxt Style Guide](https://nuxt.com/docs/4.x/guide) +- [Shadcn Vue @radix-ui](https://radix.shadcn-vue.com/) + +## Configuration + +- `nuxt.config.ts`
Nuxt configuration file +- `.env`
Some environment variables + +## Directory Structure for `app/` + +- `app.vue`: Main layout +- `components` : Contains all reusable UI components. +- `components/content` : Entry point for business logic and workflows. Pages or routes call these content components to handle API requests and process application logic +- `components/app` : View-layer components that manage and present data. These are used within `content/` to render or handle specific parts of the UI, and return results back to the content +- `components/pub` : Public/shared components used across different parts of the app. +- `composables` : Contains reusable logic and utility functions (e.g. composables, hooks).. +- `layouts` : Reusable UI layout patterns used across pages. +- `models` : Contains data definitions or interfaces. +- `schemas` : Contains JSON schemas used for validation. +- `services` : Contains reusable API calls and business logic. + + +## Directory Structure for `app/pages` + +- `pages/auth` : Authentication related pages. +- `pages/(features)` : Grouped feature modules that reflect specific business content or domains. + +## Directory Structure for `server/` + +- `server/api` : API or proxy requests + +## Workflows + +The basic development workflow follows these steps: + +### Define Your Data in `models/` + +- Create data definitions or interfaces. +- These should represent the structure of the data used across your app. + +### Build UI Components in `components/app` + +- Create reusable UI and app specific components. +- Keep components pure, avoid making HTTP requests directly within them. +- They receive data via props and emit events upward. + +### Business Logic in `components/content` + +- This layer connects the UI with the logic (API calls, validations, navigation). +- It composes components from `components/app/`, `components/pub/`, and other content. +- Also responsible for managing state, side effects, and interactions. + +### Create Pages in `pages/` + +- Define permissions and guards for each page. +- Pages load the appropriate content from `components/content/`. +- They do not contain UI or logic directly, just route level layout or guards. + +### Validation + +- UI level validation in `components/app`. help users avoid mistakes before submitting. + - Lightweight/instant validation related to UX. + - Basic formatting (email regex, numeric-only, password length). + - Showing error messages directly under the field. + +- Business level validation in `components/flow`. cannot rely only on the UI, since it often requires server-side checks or rules that may change. + - More complex validation rules tied to business logic. + +## Code Conventions + +- Under the script setup block, putting things in group with the following order: + - Imports → all dependencies, sorted by external, alias (~), and relative imports. + - Props & Emits → clearly define component inputs & outputs. + - State & Computed → all ref, reactive, and computed variables grouped together. + - Lifecycle Hooks → grouped by mounting → updating → unmounting order. + - Functions → async first (fetching, API calls), then utility & event handlers. + - Watchers → if needed, put them at the bottom. + - Template → keep clean and minimal logic, use methods/computed instead of inline JS. +- Declaration Naming + - Uses PascalCase for `type` naming + - Uses camelCase for `variable` and `const` naming + - Underscore can be used to indicates that a variable has derived from an attribute of an object
+ for example: `person_name` indicates it is an attribute `name` from object `person` +- Looping + - Uses `i`, `j`, `k` as variable for `for` looping index + - Uses `item` as object instantition for `forEach` loop callback + - Uses `item` as object instantition for `v-for` loop callback in the template + +## Git Workflows + +The basic git workflow follows these steps: + +1. Create a new branch on `dev` + - branch name should be `feat/` or `fix/` +2. Make your changes +3. Commit your changes + - commit msg format: `[type]: [description]` + - `type` can be `feat`, `fix`, `docs`, `style`, `refactor`, `perf`, `test`, `build`, `ci`, `chore`, `revert` + - `description` should be a brief description of the changes + - Example: `feat: add new feature` +4. Push your changes to `dev` +5. Create a pull request from `dev` to `main` diff --git a/app/app.vue b/app/app.vue new file mode 100644 index 00000000..46d6ca88 --- /dev/null +++ b/app/app.vue @@ -0,0 +1,25 @@ + + + diff --git a/app/assets/css/main.css b/app/assets/css/main.css new file mode 100644 index 00000000..a25bddcb --- /dev/null +++ b/app/assets/css/main.css @@ -0,0 +1,378 @@ +/* SIMRS RSSA Design System - Pure CSS (No Tailwind) */ + +/* CSS Variables */ +:root { + /* Medical Theme Colors */ + --background: 230 20% 98%; + --foreground: 210 20% 15%; + --card: 0 0% 100%; + --card-foreground: 210 20% 15%; + --popover: 0 0% 100%; + --popover-foreground: 210 20% 15%; + + /* Primary - Medical Green */ + --primary: 26 89% 57%; + --primary-foreground: 0 0% 100%; + --primary-hover: 26, 92%, 65%; + + /* Secondary - Clean Blue */ + --secondary: 40 70% 60%; + --secondary-foreground: 210 20% 100%; + --muted: 210 25% 95%; + --muted-foreground: 210 15% 50%; + + /* Accent - Neutral Gray */ + --accent: 210 40% 96%; + --accent-foreground: 222.2 84% 4.9%; + --destructive: 0 75% 55%; + --destructive-foreground: 0 0% 100%; + --border: 210 20% 88%; + --input: 210 20% 95%; + --ring: 150 75% 35%; + + /* Medical Status Colors */ + --success: 150 75% 40%; + --success-foreground: 0 0% 100%; + --warning: 45 95% 60%; + --warning-foreground: 210 20% 15%; + --info: 210 100% 50%; + --info-foreground: 0 0% 100%; + + /* Gradients */ + --gradient-primary: linear-gradient(135deg, hsl(150 75% 35%), hsl(150 75% 45%)); + --gradient-medical: linear-gradient(135deg, hsl(150 75% 35%), hsl(210 100% 50%)); + --gradient-subtle: linear-gradient(180deg, hsl(210 20% 98%), hsl(210 25% 95%)); + + /* Shadows */ + --shadow-medical: 0 4px 20px -4px hsl(150 75% 35% / 0.15); + --shadow-card: 0 2px 10px -2px hsl(210 20% 15% / 0.1); + --shadow-glow: 0 0 30px hsl(150 75% 35% / 0.2); + + /* Transitions */ + --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); + --transition-fast: all 0.15s ease-out; + + /* Border Radius */ + --radius: 0.5rem; + --radius-lg: var(--radius); + --radius-md: calc(var(--radius) - 2px); + --radius-sm: calc(var(--radius) - 4px); + + /* Sidebar */ + --sidebar-background: 0 0% 98%; + --sidebar-foreground: 240 5.3% 26.1%; + --sidebar-primary: 240 5.9% 10%; + --sidebar-primary-foreground: 0 0% 98%; + --sidebar-accent: 240 4.8% 95.9%; + --sidebar-accent-foreground: 240 5.9% 10%; + --sidebar-border: 220 13% 91%; + --sidebar-ring: 217.2 91.2% 59.8%; +} + +.dark { + --background: 210 25% 8%; + --foreground: 210 20% 95%; + --card: 210 25% 10%; + --card-foreground: 210 20% 95%; + --popover: 210 25% 10%; + --popover-foreground: 210 20% 95%; + --primary: 26 89% 57%; + --primary-foreground: 0 0% 100%; + --primary-hover: 26, 92%, 65%; + --secondary: 210 25% 15%; + --secondary-foreground: 210 20% 90%; + --muted: 210 25% 15%; + --muted-foreground: 210 15% 65%; + --accent: 210 100% 55%; + --accent-foreground: 0 0% 100%; + --destructive: 0 75% 60%; + --destructive-foreground: 0 0% 100%; + --border: 210 25% 20%; + --input: 210 25% 15%; + --ring: 150 75% 45%; + --success: 150 75% 50%; + --warning: 45 95% 65%; + --info: 210 100% 60%; + --gradient-primary: linear-gradient(135deg, hsl(150 75% 45%), hsl(150 75% 55%)); + --gradient-medical: linear-gradient(135deg, hsl(150 75% 45%), hsl(210 100% 55%)); + --gradient-subtle: linear-gradient(180deg, hsl(210 25% 8%), hsl(210 25% 12%)); + --sidebar-background: 240 5.9% 10%; + --sidebar-foreground: 240 4.8% 95.9%; + --sidebar-primary: 224.3 76.3% 48%; + --sidebar-primary-foreground: 0 0% 100%; + --sidebar-accent: 240 3.7% 15.9%; + --sidebar-accent-foreground: 240 4.8% 95.9%; + --sidebar-border: 240 3.7% 15.9%; + --sidebar-ring: 217.2 91.2% 59.8%; +} + +/* Keyframes for Animations */ +@keyframes accordion-down { + from { + height: 0; + } + to { + height: var(--radix-accordion-content-height); + } +} + +@keyframes accordion-up { + from { + height: var(--radix-accordion-content-height); + } + to { + height: 0; + } +} + +@keyframes fadeIn { + 0% { + opacity: 0; + transform: translateY(10px); + } + 100% { + opacity: 1; + transform: translateY(0); + } +} + +@keyframes slideUp { + 0% { + transform: translateY(100%); + } + 100% { + transform: translateY(0); + } +} + +@keyframes pulseMedical { + 0%, + 100% { + box-shadow: 0 0 0 0 hsl(var(--primary) / 0.4); + } + 50% { + box-shadow: 0 0 0 10px hsl(var(--primary) / 0); + } +} + +/* Base Styles */ +* { + border-color: hsl(var(--border)); + box-sizing: border-box; +} + +body { + /* background-color: hsl(var(--background)); */ + /* background-color: hsl(var(--background), 0.5); */ + color: hsl(var(--foreground)); + line-height: 1.5; + margin: 0; +} + +body { + @apply bg-slate-100 dark:bg-slate-800 ; +} + +body, table, label { + @apply md:!text-xs 2xl:!text-sm; +} + +/* Container */ +.container { + width: 100%; + margin: 0 auto; + padding: 0 2rem; +} + +@media (min-width: 1400px) { + .container { + max-width: 1400px; + } +} + +/* Color Classes */ +.bg-background { + background-color: hsl(var(--background)); +} +.bg-foreground { + background-color: hsl(var(--foreground)); +} +.bg-card { + background-color: hsl(var(--card)); +} +.bg-primary { + background-color: hsl(var(--primary)); +} +.bg-secondary { + background-color: hsl(var(--secondary)); +} +.bg-accent { + background-color: hsl(var(--accent)); +} +.bg-destructive { + background-color: hsl(var(--destructive)); +} +.bg-muted { + background-color: hsl(var(--muted)); +} +.bg-success { + background-color: hsl(var(--success)); +} +.bg-warning { + background-color: hsl(var(--warning)); +} +.bg-info { + background-color: hsl(var(--info)); +} + +.text-background { + color: hsl(var(--background)); +} +.text-foreground { + color: hsl(var(--foreground)); +} +.text-card { + color: hsl(var(--card)); +} +.text-primary { + color: hsl(var(--primary)); +} +.text-secondary { + color: hsl(var(--secondary)); +} +.text-accent { + color: hsl(var(--accent)); +} +.text-destructive { + color: hsl(var(--destructive)); +} +.text-muted { + color: hsl(var(--muted)); +} +.text-success { + color: hsl(var(--success)); +} +.text-warning { + color: hsl(var(--warning)); +} +.text-info { + color: hsl(var(--info)); +} + +.text-primary-foreground { + color: hsl(var(--primary-foreground)); +} +.text-secondary-foreground { + color: hsl(var(--secondary-foreground)); +} +.text-accent-foreground { + color: hsl(var(--accent-foreground)); +} +.text-destructive-foreground { + color: hsl(var(--destructive-foreground)); +} +.text-muted-foreground { + color: hsl(var(--muted-foreground)); +} +.text-success-foreground { + color: hsl(var(--success-foreground)); +} +.text-warning-foreground { + color: hsl(var(--warning-foreground)); +} +.text-info-foreground { + color: hsl(var(--info-foreground)); +} + +.border-primary { + border-color: hsl(var(--primary)); +} +.border-secondary { + border-color: hsl(var(--secondary)); +} +.border-accent { + border-color: hsl(var(--accent)); +} +.border-destructive { + border-color: hsl(var(--destructive)); +} +.border-input { + border-color: hsl(var(--input)); +} + +/* Sidebar Colors */ +.bg-sidebar { + background-color: hsl(var(--sidebar-background)); +} +.text-sidebar { + color: hsl(var(--sidebar-foreground)); +} +.bg-sidebar-primary { + background-color: hsl(var(--sidebar-primary)); +} +.text-sidebar-primary { + color: hsl(var(--sidebar-primary)); +} +.bg-sidebar-accent { + background-color: hsl(var(--sidebar-accent)); +} +.text-sidebar-accent { + color: hsl(var(--sidebar-accent)); +} +.border-sidebar { + border-color: hsl(var(--sidebar-border)); +} + +/* Background Images */ +.bg-gradient-medical { + background-image: var(--gradient-medical); +} +.bg-gradient-primary { + background-image: var(--gradient-primary); +} +.bg-gradient-subtle { + background-image: var(--gradient-subtle); +} + +/* Border Radius */ +.rounded-sm { + border-radius: var(--radius-sm); +} + +/* Form Error Styling */ +.field-error-info { + font-size: 0.75rem; + margin-left: 0.25rem; + color: hsl(var(--destructive)); + /* font-size: 0.875rem; */ + margin-top: 0.25rem; + min-height: 1rem; /* Reserve space to prevent CLS */ + line-height: 1.25; +} + +/* .rounded-md { border-radius: var */ + +/* Dashboard grid utility */ +.dashboard-grid { + display: grid; + gap: 1rem; +} + +@media (min-width: 768px) { + .dashboard-grid { + grid-template-columns: repeat(2, minmax(0, 1fr)); + } +} + +@media (min-width: 1024px) { + .dashboard-grid { + grid-template-columns: repeat(3, minmax(0, 1fr)); + } +} + +@media (min-width: 1280px) { + .dashboard-grid { + grid-template-columns: repeat(4, minmax(0, 1fr)); + gap: 1.25rem; + } +} diff --git a/app/components/app/assesment-function/entry-form.vue b/app/components/app/assesment-function/entry-form.vue new file mode 100644 index 00000000..5768c6a0 --- /dev/null +++ b/app/components/app/assesment-function/entry-form.vue @@ -0,0 +1,47 @@ + + + diff --git a/app/components/app/assesment-function/list-cfg.ts b/app/components/app/assesment-function/list-cfg.ts new file mode 100644 index 00000000..a11537a7 --- /dev/null +++ b/app/components/app/assesment-function/list-cfg.ts @@ -0,0 +1,114 @@ +import { defineAsyncComponent } from 'vue' +import type { Config, RecComponent } from '~/components/pub/my-ui/data-table' + +type SmallDetailDto = any + +const action = defineAsyncComponent(() => import('~/components/pub/my-ui/data/dropdown-action-dud.vue')) + +export const config: Config = { + cols: [ + {}, + {}, + {}, + { width: 100 }, + { width: 120 }, + {}, + {}, + {}, + { width: 100 }, + { width: 100 }, + {}, + { width: 50 }, + ], + + headers: [ + [ + { label: 'Nama' }, + { label: 'Rekam Medis' }, + { label: 'KTP' }, + { label: 'Tgl Lahir' }, + { label: 'Umur' }, + { label: 'JK' }, + { label: 'Pendidikan' }, + { label: 'Status' }, + { label: '' }, + ], + ], + + keys: [ + 'name', + 'medicalRecord_number', + 'identity_number', + 'birth_date', + 'patient_age', + 'gender', + 'education', + 'status', + 'action', + ], + + delKeyNames: [ + { key: 'code', label: 'Kode' }, + { key: 'name', label: 'Nama' }, + ], + + parses: { + name: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + return `${recX.firstName} ${recX.middleName || ''} ${recX.lastName || ''}` + }, + identity_number: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + if (recX.identity_number?.substring(0, 5) === 'BLANK') { + return '(TANPA NIK)' + } + return recX.identity_number + }, + birth_date: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + if (typeof recX.birth_date == 'object' && recX.birth_date) { + return (recX.birth_date as Date).toLocaleDateString() + } else if (typeof recX.birth_date == 'string') { + return (recX.birth_date as string).substring(0, 10) + } + return recX.birth_date + }, + patient_age: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + return recX.birth_date?.split('T')[0] + }, + gender: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + if (typeof recX?.gender_code !== 'number' && recX?.gender_code !== '') { + return 'Tidak Diketahui' + } + return recX.gender_code + }, + education: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + if (typeof recX.education_code == 'number' && recX.education_code >= 0) { + return recX.education_code + } else if (typeof recX.education_code) { + return recX.education_code + } + return '-' + }, + }, + + components: { + action(rec: unknown, idx: number) { + const res: RecComponent = { + idx, + rec: rec as object, + component: action, + } + return res + }, + }, + + htmls: { + patient_address(rec: unknown) { + return '-' + }, + }, +} \ No newline at end of file diff --git a/app/components/app/assesment-function/list.vue b/app/components/app/assesment-function/list.vue new file mode 100644 index 00000000..58b4f1bd --- /dev/null +++ b/app/components/app/assesment-function/list.vue @@ -0,0 +1,11 @@ + + + diff --git a/app/components/app/assesment-function/picker.vue b/app/components/app/assesment-function/picker.vue new file mode 100644 index 00000000..e69de29b diff --git a/app/components/app/assesment-function/search.vue b/app/components/app/assesment-function/search.vue new file mode 100644 index 00000000..e69de29b diff --git a/app/components/app/auth/login.vue b/app/components/app/auth/login.vue new file mode 100644 index 00000000..29fb60b4 --- /dev/null +++ b/app/components/app/auth/login.vue @@ -0,0 +1,74 @@ + + + diff --git a/app/components/app/bed/entry-form.vue b/app/components/app/bed/entry-form.vue new file mode 100644 index 00000000..f2b0c961 --- /dev/null +++ b/app/components/app/bed/entry-form.vue @@ -0,0 +1,150 @@ + + + diff --git a/app/components/app/bed/list-cfg.ts b/app/components/app/bed/list-cfg.ts new file mode 100644 index 00000000..825db939 --- /dev/null +++ b/app/components/app/bed/list-cfg.ts @@ -0,0 +1,44 @@ +import type { Config, RecComponent } from '~/components/pub/my-ui/data-table' +import { defineAsyncComponent } from 'vue' + +type SmallDetailDto = any + +const action = defineAsyncComponent(() => import('~/components/pub/my-ui/data/dropdown-action-dud.vue')) + +export const config: Config = { + cols: [{}, {}, {}, { width: 50 }], + + headers: [[ + { label: 'Kode' }, + { label: 'Nama' }, + { label: 'Kamar' }, + { label: '' }, + ]], + + keys: ['code', 'name', 'parent', 'action'], + + delKeyNames: [ + { key: 'code', label: 'Kode' }, + { key: 'name', label: 'Nama' }, + ], + + parses: { + parent: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + return recX.parent?.name || '-' + }, + }, + + components: { + action(rec, idx) { + const res: RecComponent = { + idx, + rec: rec as object, + component: action, + } + return res + }, + }, + + htmls: {}, +} diff --git a/app/components/app/bed/list.vue b/app/components/app/bed/list.vue new file mode 100644 index 00000000..19642581 --- /dev/null +++ b/app/components/app/bed/list.vue @@ -0,0 +1,36 @@ + + + \ No newline at end of file diff --git a/app/components/app/building/entry-form.vue b/app/components/app/building/entry-form.vue new file mode 100644 index 00000000..c2851e2d --- /dev/null +++ b/app/components/app/building/entry-form.vue @@ -0,0 +1,108 @@ + + + diff --git a/app/components/app/building/list-cfg.ts b/app/components/app/building/list-cfg.ts new file mode 100644 index 00000000..016caa03 --- /dev/null +++ b/app/components/app/building/list-cfg.ts @@ -0,0 +1,36 @@ +import type { Config, RecComponent } from '~/components/pub/my-ui/data-table' +import { defineAsyncComponent } from 'vue' + +const action = defineAsyncComponent(() => import('~/components/pub/my-ui/data/dropdown-action-dud.vue')) + +export const config: Config = { + cols: [{}, {}, { width: 50 }], + + headers: [[ + { label: 'Kode' }, + { label: 'Nama' }, + { label: '' }, + ]], + + keys: ['code', 'name', 'action'], + + delKeyNames: [ + { key: 'code', label: 'Kode' }, + { key: 'name', label: 'Nama' }, + ], + + parses: {}, + + components: { + action(rec, idx) { + const res: RecComponent = { + idx, + rec: rec as object, + component: action, + } + return res + }, + }, + + htmls: {}, +} diff --git a/app/components/app/building/list.vue b/app/components/app/building/list.vue new file mode 100644 index 00000000..1be60a60 --- /dev/null +++ b/app/components/app/building/list.vue @@ -0,0 +1,36 @@ + + + diff --git a/app/components/app/chamber/entry-form.vue b/app/components/app/chamber/entry-form.vue new file mode 100644 index 00000000..f44a6745 --- /dev/null +++ b/app/components/app/chamber/entry-form.vue @@ -0,0 +1,150 @@ + + + diff --git a/app/components/app/chamber/list-cfg.ts b/app/components/app/chamber/list-cfg.ts new file mode 100644 index 00000000..7f10fe7a --- /dev/null +++ b/app/components/app/chamber/list-cfg.ts @@ -0,0 +1,44 @@ +import type { Config, RecComponent } from '~/components/pub/my-ui/data-table' +import { defineAsyncComponent } from 'vue' + +type SmallDetailDto = any + +const action = defineAsyncComponent(() => import('~/components/pub/my-ui/data/dropdown-action-dud.vue')) + +export const config: Config = { + cols: [{}, {}, {}, { width: 50 }], + + headers: [[ + { label: 'Kode' }, + { label: 'Nama' }, + { label: 'Lantai' }, + { label: '' }, + ]], + + keys: ['code', 'name', 'parent', 'action'], + + delKeyNames: [ + { key: 'code', label: 'Kode' }, + { key: 'name', label: 'Nama' }, + ], + + parses: { + parent: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + return recX.parent?.name || '-' + }, + }, + + components: { + action(rec, idx) { + const res: RecComponent = { + idx, + rec: rec as object, + component: action, + } + return res + }, + }, + + htmls: {}, +} diff --git a/app/components/app/chamber/list.vue b/app/components/app/chamber/list.vue new file mode 100644 index 00000000..1be60a60 --- /dev/null +++ b/app/components/app/chamber/list.vue @@ -0,0 +1,36 @@ + + + diff --git a/app/components/app/consultation/entry.vue b/app/components/app/consultation/entry.vue new file mode 100644 index 00000000..bff12bfb --- /dev/null +++ b/app/components/app/consultation/entry.vue @@ -0,0 +1,126 @@ + + +