From 4e67cc4e195a6df41bfcfa732a564f06a4027263 Mon Sep 17 00:00:00 2001 From: Wroclaw Date: Wed, 24 May 2023 09:40:45 +0200 Subject: [PATCH] update cuz presentation --- components/alerts.vue | 63 +++++++ components/entryEditor.vue | 51 ++++++ components/navigation/navigation.vue | 8 +- components/orderView.vue | 56 ++++++ components/pagedList.vue | 2 + components/pagedTable.vue | 4 + pages/client/[id].vue | 171 +++++++++++++++-- pages/clients.vue | 127 ++++++++++--- pages/index.vue | 3 +- pages/login.vue | 7 + server/api/clients/[id]/orders.get.ts | 9 + server/api/login.post.ts | 2 +- server/api/orders.get.ts | 37 ++++ server/api/orders.post.ts | 172 ++++++++++++++++++ server/api/orders/[id].delete.ts | 17 ++ server/api/orders/[id].get.ts | 108 +++++++++++ server/api/orders/[id].patch.ts | 17 ++ .../api/orders/[id]/imported_products.get.ts | 12 ++ .../api/orders/[id]/imported_products.post.ts | 27 +++ server/api/orders/[id]/work.get.ts | 12 ++ server/api/orders/[id]/work.post.ts | 28 +++ .../api/orders/[id]/work/[idWork].delete.ts | 20 ++ server/api/orders/[id]/work/[idWork].get.ts | 11 ++ server/utils/baaPagination.ts | 2 +- server/utils/database.ts | 12 +- server/utils/getRequestingUser.ts | 25 +++ server/utils/validation.ts | 31 ++++ {server/utils => utils}/snowflake.ts | 10 +- utils/types/database.ts | 109 +++++++---- 29 files changed, 1065 insertions(+), 88 deletions(-) create mode 100644 components/alerts.vue create mode 100644 components/entryEditor.vue create mode 100644 components/orderView.vue create mode 100644 server/api/clients/[id]/orders.get.ts create mode 100644 server/api/orders.get.ts create mode 100644 server/api/orders.post.ts create mode 100644 server/api/orders/[id].delete.ts create mode 100644 server/api/orders/[id].get.ts create mode 100644 server/api/orders/[id].patch.ts create mode 100644 server/api/orders/[id]/imported_products.get.ts create mode 100644 server/api/orders/[id]/imported_products.post.ts create mode 100644 server/api/orders/[id]/work.get.ts create mode 100644 server/api/orders/[id]/work.post.ts create mode 100644 server/api/orders/[id]/work/[idWork].delete.ts create mode 100644 server/api/orders/[id]/work/[idWork].get.ts create mode 100644 server/utils/getRequestingUser.ts create mode 100644 server/utils/validation.ts rename {server/utils => utils}/snowflake.ts (86%) diff --git a/components/alerts.vue b/components/alerts.vue new file mode 100644 index 0000000..1301eab --- /dev/null +++ b/components/alerts.vue @@ -0,0 +1,63 @@ + + + + + diff --git a/components/entryEditor.vue b/components/entryEditor.vue new file mode 100644 index 0000000..49a0651 --- /dev/null +++ b/components/entryEditor.vue @@ -0,0 +1,51 @@ + + + diff --git a/components/navigation/navigation.vue b/components/navigation/navigation.vue index 02ee1f2..c72c67d 100644 --- a/components/navigation/navigation.vue +++ b/components/navigation/navigation.vue @@ -13,18 +13,20 @@ const navOpen = ref(!mobile.value); Database Project - + - + + + diff --git a/components/orderView.vue b/components/orderView.vue new file mode 100644 index 0000000..aa540b7 --- /dev/null +++ b/components/orderView.vue @@ -0,0 +1,56 @@ + + + diff --git a/components/pagedList.vue b/components/pagedList.vue index 952a2c7..24dc5ed 100644 --- a/components/pagedList.vue +++ b/components/pagedList.vue @@ -2,6 +2,7 @@ const props = defineProps<{ records: Array, recordKey: string, + recordValue?: string, variant?: "default" | "inset" | "accordion" | "popout", modelValue?: any, }>(); @@ -22,6 +23,7 @@ defineEmits<{ v-for="record in records" :key="record[recordKey]" :variant="props.variant ?? 'default'" + :value="recordValue !== undefined ? record[recordValue] : undefined" >