feat: add clients nomenclator, order edit/delete/devalidate, invoice types, dashboard redesign
- New clients table with PF/PJ support, fiscal data (CUI, IBAN, eFactura fields) - Full CRUD API for clients with search, sync integration - Order lifecycle: edit header (DRAFT), devalidate (VALIDAT→DRAFT), delete order/invoice - Invoice types: FACTURA (B2B) vs BON_FISCAL (B2C) with different nr formats - OrderCreateView redesigned as multi-step flow (client→vehicle→details) - Autocomplete from catalog_norme/catalog_preturi in OrderLineForm - Dashboard now combines stats + full orders table with filter tabs and search - ClientPicker and VehiclePicker with inline creation capability - Frontend schema aligned with backend (missing columns causing sync errors) - Mobile responsive fixes for OrderDetailView buttons Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
"headers": {"Authorization": "Bearer <token>"},
|
||||
"response": {
|
||||
"tables": {
|
||||
"vehicles": [], "orders": [], "order_lines": [],
|
||||
"clients": [], "vehicles": [], "orders": [], "order_lines": [],
|
||||
"invoices": [], "appointments": [],
|
||||
"catalog_marci": [], "catalog_modele": [],
|
||||
"catalog_ansamble": [], "catalog_norme": [],
|
||||
@@ -42,12 +42,22 @@
|
||||
},
|
||||
"orders": {
|
||||
"GET /orders": {"response": [{"id": "str", "status": "str", "nr_auto": "str", "total_general": 0}]},
|
||||
"POST /orders": {"body": {"vehicle_id": "str", "tip_deviz_id": "str", "km_intrare": 0, "observatii": "str"}, "response": {"id": "str"}},
|
||||
"POST /orders": {"body": {"vehicle_id": "str", "client_id": "str", "tip_deviz_id": "str", "km_intrare": 0, "observatii": "str"}, "response": {"id": "str"}},
|
||||
"GET /orders/{id}": {"response": {"id": "str", "status": "str", "lines": []}},
|
||||
"PUT /orders/{id}": {"body": {"vehicle_id": "str", "client_id": "str", "tip_deviz_id": "str", "km_intrare": 0, "observatii": "str"}, "note": "Edit header - doar in DRAFT"},
|
||||
"DELETE /orders/{id}": {"response": {"ok": true}, "note": "Stergere - orice nefacturat; FACTURAT = sterge factura intai"},
|
||||
"POST /orders/{id}/lines": {"body": {"tip": "manopera|material", "descriere": "str", "ore": 0, "pret_ora": 0, "cantitate": 0, "pret_unitar": 0, "um": "str"}},
|
||||
"POST /orders/{id}/validate": {"response": {"status": "VALIDAT"}},
|
||||
"POST /orders/{id}/devalidate": {"response": {"status": "DRAFT"}, "note": "VALIDAT → DRAFT"},
|
||||
"GET /orders/{id}/pdf/deviz": {"response": "application/pdf"}
|
||||
},
|
||||
"clients": {
|
||||
"GET /clients": {"response": [{"id": "str", "tip_persoana": "PF|PJ", "denumire": "str", "cod_fiscal": "str", "telefon": "str", "email": "str", "activ": true}]},
|
||||
"POST /clients": {"body": {"tip_persoana": "PF|PJ", "denumire": "str", "cod_fiscal": "str", "reg_com": "str", "adresa": "str", "judet": "str", "oras": "str", "cod_postal": "str", "tara": "str", "telefon": "str", "email": "str", "cont_iban": "str", "banca": "str", "observatii": "str"}, "response": {"id": "str"}},
|
||||
"GET /clients/{id}": {"response": {"id": "str", "tip_persoana": "str", "denumire": "str", "cod_fiscal": "str", "vehicles": []}},
|
||||
"PUT /clients/{id}": {"body": {"denumire": "str", "cod_fiscal": "str", "adresa": "str"}, "response": {"id": "str"}},
|
||||
"DELETE /clients/{id}": {"response": {"ok": true}}
|
||||
},
|
||||
"vehicles": {
|
||||
"GET /vehicles": {"response": [{"id": "str", "nr_auto": "str", "marca": "str", "model": "str", "an": 0}]},
|
||||
"POST /vehicles": {"body": {"nr_auto": "str", "marca_id": "str", "model_id": "str", "an_fabricatie": 0, "vin": "str", "proprietar_nume": "str", "proprietar_telefon": "str"}},
|
||||
@@ -60,8 +70,9 @@
|
||||
"POST /p/{token}/reject": {"response": {"ok": true}}
|
||||
},
|
||||
"invoices": {
|
||||
"POST /invoices": {"body": {"order_id": "str"}, "response": {"id": "str", "nr_factura": "str"}},
|
||||
"GET /invoices/{id}/pdf": {"response": "application/pdf"}
|
||||
"POST /invoices": {"body": {"order_id": "str", "client_id": "str", "tip_document": "FACTURA|BON_FISCAL"}, "response": {"id": "str", "nr_factura": "str"}},
|
||||
"GET /invoices/{id}/pdf": {"response": "application/pdf"},
|
||||
"DELETE /invoices/{id}": {"response": {"ok": true}, "note": "Sterge factura, comanda revine la VALIDAT"}
|
||||
},
|
||||
"users": {
|
||||
"GET /users": {"response": [{"id": "str", "email": "str", "rol": "str"}]},
|
||||
|
||||
Reference in New Issue
Block a user