diff --git a/pages/clients.vue b/pages/clients.vue index f85620e..743158a 100644 --- a/pages/clients.vue +++ b/pages/clients.vue @@ -98,6 +98,7 @@ async function handleSubmit() { }, ); clients.value.unshift(result); + count.value.count++; } catch (e) { console.error(e); submitting.value = false; diff --git a/pages/orders.vue b/pages/orders.vue index 4dbcfb7..b583479 100644 --- a/pages/orders.vue +++ b/pages/orders.vue @@ -93,6 +93,14 @@ async function handleSubmit() { body: formData.value, }, ); + orders.value.unshift({ + ...result, + imported_products_count: result.imported_products.length, + work_count: result.work.length, + // NOTE: currently all newly created orders on this page are valued zero + value: 0, + }); + count.value.count++; } catch (e) { console.error(e); submitting.value = false; diff --git a/server/api/orders/[id].get.ts b/server/api/orders/[id].get.ts index a98bca9..aad124e 100644 --- a/server/api/orders/[id].get.ts +++ b/server/api/orders/[id].get.ts @@ -25,6 +25,7 @@ export async function getOrder(id: bigint) { offer: true, }, }, + client: true, }, });