diff --git a/openapi.json b/openapi.json index 27f50c0d82090d66a6d085f3f7c32aad47c910f7..c6bfc18d901296554394705bc3dd95fecaa5bf65 100644 --- a/openapi.json +++ b/openapi.json @@ -8,6 +8,7 @@ "summary": "Read Items", "description": "retrieve all items, sorted by id.\npaginate the results.", "operationId": "items-read_items", + "security": [{ "HTTPBearer": [] }], "parameters": [ { "name": "page", @@ -26,6 +27,15 @@ "title": "Limit" } }, + { + "name": "search", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Search" + } + }, { "name": "price", "in": "query", @@ -52,15 +62,6 @@ "anyOf": [{ "type": "boolean" }, { "type": "null" }], "title": "Active" } - }, - { - "name": "search", - "in": "query", - "required": false, - "schema": { - "anyOf": [{ "type": "string" }, { "type": "null" }], - "title": "Search" - } } ], "responses": { @@ -87,6 +88,7 @@ "summary": "Create Item", "description": "create a new item.", "operationId": "items-create_item", + "security": [{ "HTTPBearer": [] }], "requestBody": { "required": true, "content": { @@ -121,6 +123,7 @@ "summary": "Read Item", "description": "retrieve a single item by id.", "operationId": "items-read_item", + "security": [{ "HTTPBearer": [] }], "parameters": [ { "name": "item_id", @@ -153,6 +156,7 @@ "summary": "Update Item", "description": "update an item.", "operationId": "items-update_item", + "security": [{ "HTTPBearer": [] }], "parameters": [ { "name": "item_id", @@ -193,6 +197,7 @@ "summary": "Delete Item", "description": "delete an item.", "operationId": "items-delete_item", + "security": [{ "HTTPBearer": [] }], "parameters": [ { "name": "item_id", @@ -227,6 +232,7 @@ "summary": "Read Invoice", "description": "Retrieve a single Invoice by id.", "operationId": "invoices-read_Invoice", + "security": [{ "HTTPBearer": [] }], "parameters": [ { "name": "invoice_id", @@ -267,6 +273,7 @@ "summary": "Read Invoices", "description": "Retrieve all Invoices, sorted by id.\nPaginate the results.", "operationId": "invoices-read_Invoices", + "security": [{ "HTTPBearer": [] }], "parameters": [ { "name": "page", @@ -286,21 +293,12 @@ } }, { - "name": "adress", - "in": "query", - "required": false, - "schema": { - "anyOf": [{ "type": "string" }, { "type": "null" }], - "title": "Adress" - } - }, - { - "name": "kst", + "name": "search", "in": "query", "required": false, "schema": { "anyOf": [{ "type": "string" }, { "type": "null" }], - "title": "Kst" + "title": "Search" } }, { @@ -355,13 +353,201 @@ } }, { - "name": "items", + "name": "kst__search", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Kst Search" + } + }, + { + "name": "kst__kst_number", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "integer" }, { "type": "null" }], + "title": "Kst Kst Number" + } + }, + { + "name": "kst__name_de", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Kst Name De" + } + }, + { + "name": "kst__name_en", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Kst Name En" + } + }, + { + "name": "kst__owner", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Kst Owner" + } + }, + { + "name": "kst__active", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "boolean" }, { "type": "null" }], + "title": "Kst Active" + } + }, + { + "name": "kst__budget_plus", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "integer" }, { "type": "null" }], + "title": "Kst Budget Plus" + } + }, + { + "name": "kst__budget_minus", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "integer" }, { "type": "null" }], + "title": "Kst Budget Minus" + } + }, + { + "name": "debitor__search", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Debitor Search" + } + }, + { + "name": "debitor__kst__search", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Debitor Kst Search" + } + }, + { + "name": "debitor__kst__kst_number", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "integer" }, { "type": "null" }], + "title": "Debitor Kst Kst Number" + } + }, + { + "name": "debitor__kst__name_de", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Debitor Kst Name De" + } + }, + { + "name": "debitor__kst__name_en", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Debitor Kst Name En" + } + }, + { + "name": "debitor__kst__owner", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Debitor Kst Owner" + } + }, + { + "name": "debitor__kst__active", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "boolean" }, { "type": "null" }], + "title": "Debitor Kst Active" + } + }, + { + "name": "debitor__kst__budget_plus", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "integer" }, { "type": "null" }], + "title": "Debitor Kst Budget Plus" + } + }, + { + "name": "debitor__kst__budget_minus", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "integer" }, { "type": "null" }], + "title": "Debitor Kst Budget Minus" + } + }, + { + "name": "debitor__ledger__search", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Debitor Ledger Search" + } + }, + { + "name": "debitor__ledger__accountnumber", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "integer" }, { "type": "null" }], + "title": "Debitor Ledger Accountnumber" + } + }, + { + "name": "debitor__ledger__namede", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Debitor Ledger Namede" + } + }, + { + "name": "debitor__ledger__nameen", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Debitor Ledger Nameen" + } + }, + { + "name": "debitor__mwst", "in": "query", "required": false, "schema": { "anyOf": [{ "type": "string" }, { "type": "null" }], - "default": "", - "title": "Items" + "title": "Debitor Mwst" } } ], @@ -369,11 +555,7 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { "$ref": "#/components/schemas/DebitorFilter" }, - { "type": "null" } - ], - "title": "Debitor" + "$ref": "#/components/schemas/Body_invoices-read_Invoices" } } } @@ -402,6 +584,7 @@ "summary": "Create Invoice", "description": "Create a new Invoice.", "operationId": "invoices-create_Invoice", + "security": [{ "HTTPBearer": [] }], "requestBody": { "required": true, "content": { @@ -438,6 +621,7 @@ "summary": "Update Invoice", "description": "update an Invoice.", "operationId": "invoices-update_Invoice", + "security": [{ "HTTPBearer": [] }], "parameters": [ { "name": "invoice_id", @@ -484,6 +668,7 @@ "summary": "Delete Invoice", "description": "delete an Invoice.", "operationId": "invoices-delete_Invoice", + "security": [{ "HTTPBearer": [] }], "parameters": [ { "name": "Invoice_id", @@ -522,6 +707,7 @@ "summary": "Read Ledgers", "description": "retrieve all ledgers, sorted by accountnumber.\npaginate the results.", "operationId": "ledgers-read_ledgers", + "security": [{ "HTTPBearer": [] }], "parameters": [ { "name": "page", @@ -540,6 +726,15 @@ "title": "Limit" } }, + { + "name": "search", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Search" + } + }, { "name": "accountnumber", "in": "query", @@ -550,12 +745,21 @@ } }, { - "name": "search", + "name": "namede", "in": "query", "required": false, "schema": { "anyOf": [{ "type": "string" }, { "type": "null" }], - "title": "Search" + "title": "Namede" + } + }, + { + "name": "nameen", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Nameen" } } ], @@ -583,6 +787,7 @@ "summary": "Create Ledger", "description": "create a new Ledger.", "operationId": "ledgers-create_ledger", + "security": [{ "HTTPBearer": [] }], "requestBody": { "required": true, "content": { @@ -617,6 +822,7 @@ "summary": "Read Ledger", "description": "retrieve a single Ledger by id.", "operationId": "ledgers-read_ledger", + "security": [{ "HTTPBearer": [] }], "parameters": [ { "name": "ledger_id", @@ -653,6 +859,7 @@ "summary": "Update Ledger", "description": "update an Ledger.", "operationId": "ledgers-update_ledger", + "security": [{ "HTTPBearer": [] }], "parameters": [ { "name": "ledger_id", @@ -697,6 +904,7 @@ "summary": "Delete Ledger", "description": "delete an Ledger.", "operationId": "ledgers-delete_ledger", + "security": [{ "HTTPBearer": [] }], "parameters": [ { "name": "ledger_id", @@ -735,6 +943,7 @@ "summary": "Read Ksts", "description": "retrieve all ksts, sorted by accountnumber.\npaginate the results.", "operationId": "ksts-read_ksts", + "security": [{ "HTTPBearer": [] }], "parameters": [ { "name": "page", @@ -754,48 +963,103 @@ } }, { - "name": "accountnumber", + "name": "search", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Search" + } + }, + { + "name": "kst_number", "in": "query", "required": false, "schema": { "anyOf": [{ "type": "integer" }, { "type": "null" }], - "title": "Accountnumber" + "title": "Kst Number" } }, { - "name": "search", + "name": "name_de", "in": "query", "required": false, "schema": { "anyOf": [{ "type": "string" }, { "type": "null" }], - "title": "Search" + "title": "Name De" } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/KstsPublic" } - } + }, + { + "name": "name_en", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Name En" } }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/HTTPValidationError" } - } + { + "name": "owner", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Owner" } - } - } - }, - "post": { - "tags": ["ksts"], - "summary": "Create Kst", + }, + { + "name": "active", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "boolean" }, { "type": "null" }], + "title": "Active" + } + }, + { + "name": "budget_plus", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "integer" }, { "type": "null" }], + "title": "Budget Plus" + } + }, + { + "name": "budget_minus", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "integer" }, { "type": "null" }], + "title": "Budget Minus" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/KstsPublic" } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } + } + } + } + } + }, + "post": { + "tags": ["ksts"], + "summary": "Create Kst", "description": "create a new Kst.", "operationId": "ksts-create_kst", + "security": [{ "HTTPBearer": [] }], "requestBody": { "required": true, "content": { @@ -830,6 +1094,7 @@ "summary": "Read Kst", "description": "retrieve a single Kst by id.", "operationId": "ksts-read_kst", + "security": [{ "HTTPBearer": [] }], "parameters": [ { "name": "kst_id", @@ -862,6 +1127,7 @@ "summary": "Update Kst", "description": "update an Kst.", "operationId": "ksts-update_kst", + "security": [{ "HTTPBearer": [] }], "parameters": [ { "name": "kst_id", @@ -902,6 +1168,7 @@ "summary": "Delete Kst", "description": "delete an Kst.", "operationId": "ksts-delete_kst", + "security": [{ "HTTPBearer": [] }], "parameters": [ { "name": "kst_id", @@ -936,6 +1203,7 @@ "summary": "Read Addresses", "description": "retrieve all addresses, sorted by name.\npaginate the results.", "operationId": "addresses-read_addresses", + "security": [{ "HTTPBearer": [] }], "parameters": [ { "name": "page", @@ -955,21 +1223,75 @@ } }, { - "name": "accountnumber", + "name": "search", "in": "query", "required": false, "schema": { - "anyOf": [{ "type": "integer" }, { "type": "null" }], - "title": "Accountnumber" + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Search" } }, { - "name": "search", + "name": "name", "in": "query", "required": false, "schema": { "anyOf": [{ "type": "string" }, { "type": "null" }], - "title": "Search" + "title": "Name" + } + }, + { + "name": "address1", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Address1" + } + }, + { + "name": "address2", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Address2" + } + }, + { + "name": "address3", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Address3" + } + }, + { + "name": "city", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "City" + } + }, + { + "name": "country", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Country" + } + }, + { + "name": "plz", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "integer" }, { "type": "null" }], + "title": "Plz" } } ], @@ -997,6 +1319,7 @@ "summary": "Create Address", "description": "create a new Address.", "operationId": "addresses-create_address", + "security": [{ "HTTPBearer": [] }], "requestBody": { "required": true, "content": { @@ -1031,6 +1354,7 @@ "summary": "Read Address", "description": "retrieve a single Address by id.", "operationId": "addresses-read_address", + "security": [{ "HTTPBearer": [] }], "parameters": [ { "name": "address_id", @@ -1067,6 +1391,7 @@ "summary": "Update Address", "description": "update an Address.", "operationId": "addresses-update_address", + "security": [{ "HTTPBearer": [] }], "parameters": [ { "name": "address_id", @@ -1111,6 +1436,7 @@ "summary": "Delete Address", "description": "delete an Address.", "operationId": "addresses-delete_address", + "security": [{ "HTTPBearer": [] }], "parameters": [ { "name": "address_id", @@ -1149,6 +1475,7 @@ "summary": "Read Internaltransferes", "description": "retrieve all InternalTransferes, sorted by name.\npaginate the results.", "operationId": "internalTransfers-read_InternalTransferes", + "security": [{ "HTTPBearer": [] }], "parameters": [ { "name": "page", @@ -1168,165 +1495,781 @@ } }, { - "name": "debitor", + "name": "search", "in": "query", "required": false, "schema": { "anyOf": [{ "type": "string" }, { "type": "null" }], - "title": "Debitor" + "title": "Search" } }, { - "name": "creditor", + "name": "amount", "in": "query", "required": false, "schema": { "anyOf": [{ "type": "string" }, { "type": "null" }], - "title": "Creditor" + "title": "Amount" } }, { - "name": "amount", + "name": "debitor__search", "in": "query", "required": false, "schema": { "anyOf": [{ "type": "string" }, { "type": "null" }], - "title": "Amount" + "title": "Debitor Search" } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InternalTransfersList" - } - } + }, + { + "name": "debitor__kst__search", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Debitor Kst Search" } }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/HTTPValidationError" } - } + { + "name": "debitor__kst__kst_number", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "integer" }, { "type": "null" }], + "title": "Debitor Kst Kst Number" } - } - } - }, - "post": { - "tags": ["internalTransfers"], - "summary": "Create Internaltransfer", - "description": "create a new InternalTransfer.", - "operationId": "internalTransfers-create_InternalTransfer", - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InternalTransferCreate" - } + }, + { + "name": "debitor__kst__name_de", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Debitor Kst Name De" } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InternalTransferPublic-Output" - } - } + }, + { + "name": "debitor__kst__name_en", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Debitor Kst Name En" } }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/HTTPValidationError" } - } + { + "name": "debitor__kst__owner", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Debitor Kst Owner" } - } - } - } - }, - "/api/internalTransfers/{InternalTransfer_id}": { - "get": { - "tags": ["internalTransfers"], - "summary": "Read Internaltransfer", - "description": "retrieve a single InternalTransfer by id.", - "operationId": "internalTransfers-read_InternalTransfer", - "parameters": [ + }, { - "name": "InternalTransfer_id", - "in": "path", - "required": true, + "name": "debitor__kst__active", + "in": "query", + "required": false, "schema": { - "type": "string", - "format": "uuid", - "title": "Internaltransfer Id" + "anyOf": [{ "type": "boolean" }, { "type": "null" }], + "title": "Debitor Kst Active" } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InternalTransferPublic-Output" - } - } + }, + { + "name": "debitor__kst__budget_plus", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "integer" }, { "type": "null" }], + "title": "Debitor Kst Budget Plus" } }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/HTTPValidationError" } - } + { + "name": "debitor__kst__budget_minus", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "integer" }, { "type": "null" }], + "title": "Debitor Kst Budget Minus" } - } - } - }, - "patch": { - "tags": ["internalTransfers"], - "summary": "Update Internaltransfer", - "description": "update an InternalTransfer.", - "operationId": "internalTransfers-update_InternalTransfer", - "parameters": [ + }, { - "name": "internalTransfer_id", + "name": "debitor__ledger__search", "in": "query", - "required": true, + "required": false, "schema": { - "type": "string", - "format": "uuid", - "title": "Internaltransfer Id" + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Debitor Ledger Search" + } + }, + { + "name": "debitor__ledger__accountnumber", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "integer" }, { "type": "null" }], + "title": "Debitor Ledger Accountnumber" + } + }, + { + "name": "debitor__ledger__namede", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Debitor Ledger Namede" + } + }, + { + "name": "debitor__ledger__nameen", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Debitor Ledger Nameen" + } + }, + { + "name": "debitor__mwst", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Debitor Mwst" + } + }, + { + "name": "creditor__search", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Creditor Search" + } + }, + { + "name": "creditor__kst__search", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Creditor Kst Search" + } + }, + { + "name": "creditor__kst__kst_number", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "integer" }, { "type": "null" }], + "title": "Creditor Kst Kst Number" + } + }, + { + "name": "creditor__kst__name_de", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Creditor Kst Name De" + } + }, + { + "name": "creditor__kst__name_en", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Creditor Kst Name En" + } + }, + { + "name": "creditor__kst__owner", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Creditor Kst Owner" + } + }, + { + "name": "creditor__kst__active", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "boolean" }, { "type": "null" }], + "title": "Creditor Kst Active" + } + }, + { + "name": "creditor__kst__budget_plus", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "integer" }, { "type": "null" }], + "title": "Creditor Kst Budget Plus" + } + }, + { + "name": "creditor__kst__budget_minus", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "integer" }, { "type": "null" }], + "title": "Creditor Kst Budget Minus" + } + }, + { + "name": "creditor__ledger__search", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Creditor Ledger Search" + } + }, + { + "name": "creditor__ledger__accountnumber", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "integer" }, { "type": "null" }], + "title": "Creditor Ledger Accountnumber" + } + }, + { + "name": "creditor__ledger__namede", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Creditor Ledger Namede" + } + }, + { + "name": "creditor__ledger__nameen", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Creditor Ledger Nameen" + } + }, + { + "name": "creditor__amount", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "integer" }, { "type": "null" }], + "title": "Creditor Amount" + } + }, + { + "name": "creditor__accounting_year", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "integer" }, { "type": "null" }], + "title": "Creditor Accounting Year" + } + }, + { + "name": "creditor__currency", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { "$ref": "#/components/schemas/Currency" }, + { "type": "null" } + ], + "title": "Creditor Currency" + } + }, + { + "name": "creditor__comment", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Creditor Comment" + } + }, + { + "name": "creditor__qcomment", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Creditor Qcomment" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_internalTransfers-read_InternalTransferes" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalTransfersList" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } + } + } + } + } + }, + "post": { + "tags": ["internalTransfers"], + "summary": "Create Internaltransfer", + "description": "create a new InternalTransfer.", + "operationId": "internalTransfers-create_InternalTransfer", + "security": [{ "HTTPBearer": [] }], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalTransferCreate" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalTransferPublic-Output" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } + } + } + } + } + } + }, + "/api/internalTransfers/{InternalTransfer_id}": { + "get": { + "tags": ["internalTransfers"], + "summary": "Read Internaltransfer", + "description": "retrieve a single InternalTransfer by id.", + "operationId": "internalTransfers-read_InternalTransfer", + "security": [{ "HTTPBearer": [] }], + "parameters": [ + { + "name": "InternalTransfer_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid", + "title": "Internaltransfer Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalTransferPublic-Output" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } + } + } + } + } + }, + "patch": { + "tags": ["internalTransfers"], + "summary": "Update Internaltransfer", + "description": "update an InternalTransfer.", + "operationId": "internalTransfers-update_InternalTransfer", + "security": [{ "HTTPBearer": [] }], + "parameters": [ + { + "name": "internalTransfer_id", + "in": "query", + "required": true, + "schema": { + "type": "string", + "format": "uuid", + "title": "Internaltransfer Id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalTransferPublic-Input" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalTransferPublic-Output" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } + } + } + } + } + }, + "delete": { + "tags": ["internalTransfers"], + "summary": "Delete Internaltransfer", + "description": "delete an InternalTransfer.", + "operationId": "internalTransfers-delete_InternalTransfer", + "security": [{ "HTTPBearer": [] }], + "parameters": [ + { + "name": "InternalTransfer_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid", + "title": "Internaltransfer Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/InternalTransfer" } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } + } + } + } + } + } + }, + "/api/bills/": { + "get": { + "tags": ["bills"], + "summary": "Read Bills", + "description": "retrieve all Billes, sorted by name.\npaginate the results.", + "operationId": "bills-read_Bills", + "security": [{ "HTTPBearer": [] }], + "parameters": [ + { + "name": "page", + "in": "query", + "required": false, + "schema": { "type": "integer", "default": 0, "title": "Page" } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 1000, + "default": 100, + "title": "Limit" + } + }, + { + "name": "search", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Search" + } + }, + { + "name": "reference", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Reference" + } + }, + { + "name": "iban", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Iban" + } + }, + { + "name": "recipt", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Recipt" + } + }, + { + "name": "comment", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Comment" + } + }, + { + "name": "address__search", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Address Search" + } + }, + { + "name": "address__name", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Address Name" + } + }, + { + "name": "address__address1", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Address Address1" + } + }, + { + "name": "address__address2", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Address Address2" + } + }, + { + "name": "address__address3", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Address Address3" + } + }, + { + "name": "address__city", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Address City" + } + }, + { + "name": "address__country", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Address Country" + } + }, + { + "name": "address__plz", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "integer" }, { "type": "null" }], + "title": "Address Plz" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "anyOf": [ + { "$ref": "#/components/schemas/AddressFilter" }, + { "type": "null" } + ], + "title": "Address" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/BillsList" } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } + } } } - ], + } + }, + "post": { + "tags": ["bills"], + "summary": "Create Bill", + "description": "create a new Bill.", + "operationId": "bills-create_Bill", + "security": [{ "HTTPBearer": [] }], "requestBody": { "required": true, "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/InternalTransferPublic-Input" + "schema": { "$ref": "#/components/schemas/BillCreate" } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/BillPublic-Output" } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } + } + } + } + } + } + }, + "/api/bills/{Bill_id}": { + "get": { + "tags": ["bills"], + "summary": "Read Bill", + "description": "retrieve a single Bill by id.", + "operationId": "bills-read_Bill", + "security": [{ "HTTPBearer": [] }], + "parameters": [ + { + "name": "bill_id", + "in": "query", + "required": true, + "schema": { "type": "string", "format": "uuid", "title": "Bill Id" } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/BillPublic-Output" } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } + } + }, + "patch": { + "tags": ["bills"], + "summary": "Update Bill", + "description": "update an Bill.", + "operationId": "bills-update_Bill", + "security": [{ "HTTPBearer": [] }], + "parameters": [ + { + "name": "Bill_id", + "in": "path", + "required": true, + "schema": { "type": "string", "format": "uuid", "title": "Bill Id" } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/BillPublic-Input" } + } + } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/InternalTransferPublic-Output" - } + "schema": { "$ref": "#/components/schemas/BillPublic-Output" } } } }, @@ -1341,20 +2284,17 @@ } }, "delete": { - "tags": ["internalTransfers"], - "summary": "Delete Internaltransfer", - "description": "delete an InternalTransfer.", - "operationId": "internalTransfers-delete_InternalTransfer", + "tags": ["bills"], + "summary": "Delete Bill", + "description": "delete an Bill.", + "operationId": "bills-delete_Bill", + "security": [{ "HTTPBearer": [] }], "parameters": [ { - "name": "InternalTransfer_id", + "name": "Bill_id", "in": "path", "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "Internaltransfer Id" - } + "schema": { "type": "string", "format": "uuid", "title": "Bill Id" } } ], "responses": { @@ -1362,7 +2302,7 @@ "description": "Successful Response", "content": { "application/json": { - "schema": { "$ref": "#/components/schemas/InternalTransfer" } + "schema": { "$ref": "#/components/schemas/Bill" } } } }, @@ -1377,12 +2317,13 @@ } } }, - "/api/bills/": { + "/api/reimbursements/": { "get": { - "tags": ["bills"], - "summary": "Read Bills", - "description": "retrieve all Billes, sorted by name.\npaginate the results.", - "operationId": "bills-read_Bills", + "tags": ["reimbursements"], + "summary": "Read Reimbursements", + "description": "retrieve all Reimbursementes, sorted by name.\npaginate the results.", + "operationId": "reimbursements-read_Reimbursements", + "security": [{ "HTTPBearer": [] }], "parameters": [ { "name": "page", @@ -1402,66 +2343,208 @@ } }, { - "name": "creditor", + "name": "search", "in": "query", "required": false, "schema": { "anyOf": [{ "type": "string" }, { "type": "null" }], - "title": "Creditor" + "title": "Search" } }, { - "name": "address", + "name": "recipt", "in": "query", "required": false, "schema": { "anyOf": [{ "type": "string" }, { "type": "null" }], - "title": "Address" + "title": "Recipt" } }, { - "name": "reference", + "name": "creditor__search", "in": "query", "required": false, "schema": { "anyOf": [{ "type": "string" }, { "type": "null" }], - "title": "Reference" + "title": "Creditor Search" } }, { - "name": "iban", + "name": "creditor__kst__search", "in": "query", "required": false, "schema": { "anyOf": [{ "type": "string" }, { "type": "null" }], - "title": "Iban" + "title": "Creditor Kst Search" } }, { - "name": "recipt", + "name": "creditor__kst__kst_number", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "integer" }, { "type": "null" }], + "title": "Creditor Kst Kst Number" + } + }, + { + "name": "creditor__kst__name_de", "in": "query", "required": false, "schema": { "anyOf": [{ "type": "string" }, { "type": "null" }], - "title": "Recipt" + "title": "Creditor Kst Name De" } }, { - "name": "comment", + "name": "creditor__kst__name_en", "in": "query", "required": false, "schema": { "anyOf": [{ "type": "string" }, { "type": "null" }], - "title": "Comment" + "title": "Creditor Kst Name En" + } + }, + { + "name": "creditor__kst__owner", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Creditor Kst Owner" + } + }, + { + "name": "creditor__kst__active", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "boolean" }, { "type": "null" }], + "title": "Creditor Kst Active" + } + }, + { + "name": "creditor__kst__budget_plus", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "integer" }, { "type": "null" }], + "title": "Creditor Kst Budget Plus" + } + }, + { + "name": "creditor__kst__budget_minus", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "integer" }, { "type": "null" }], + "title": "Creditor Kst Budget Minus" + } + }, + { + "name": "creditor__ledger__search", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Creditor Ledger Search" + } + }, + { + "name": "creditor__ledger__accountnumber", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "integer" }, { "type": "null" }], + "title": "Creditor Ledger Accountnumber" + } + }, + { + "name": "creditor__ledger__namede", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Creditor Ledger Namede" + } + }, + { + "name": "creditor__ledger__nameen", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Creditor Ledger Nameen" + } + }, + { + "name": "creditor__amount", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "integer" }, { "type": "null" }], + "title": "Creditor Amount" + } + }, + { + "name": "creditor__accounting_year", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "integer" }, { "type": "null" }], + "title": "Creditor Accounting Year" + } + }, + { + "name": "creditor__currency", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { "$ref": "#/components/schemas/Currency" }, + { "type": "null" } + ], + "title": "Creditor Currency" + } + }, + { + "name": "creditor__comment", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Creditor Comment" + } + }, + { + "name": "creditor__qcomment", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Creditor Qcomment" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "anyOf": [ + { "$ref": "#/components/schemas/CreditorFilter" }, + { "type": "null" } + ], + "title": "Creditor" + } } } - ], + }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { - "schema": { "$ref": "#/components/schemas/BillsList" } + "schema": { "$ref": "#/components/schemas/ReimbursementsList" } } } }, @@ -1476,15 +2559,16 @@ } }, "post": { - "tags": ["bills"], - "summary": "Create Bill", - "description": "create a new Bill.", - "operationId": "bills-create_Bill", + "tags": ["reimbursements"], + "summary": "Create Reimbursement", + "description": "create a new Reimbursement.", + "operationId": "reimbursements-create_Reimbursement", + "security": [{ "HTTPBearer": [] }], "requestBody": { "required": true, "content": { "application/json": { - "schema": { "$ref": "#/components/schemas/BillCreate" } + "schema": { "$ref": "#/components/schemas/ReimbursementCreate" } } } }, @@ -1493,7 +2577,9 @@ "description": "Successful Response", "content": { "application/json": { - "schema": { "$ref": "#/components/schemas/BillPublic-Output" } + "schema": { + "$ref": "#/components/schemas/ReimbursementPublic-Output" + } } } }, @@ -1508,18 +2594,23 @@ } } }, - "/api/bills/{Bill_id}": { + "/api/reimbursements/{Reimbursement_id}": { "get": { - "tags": ["bills"], - "summary": "Read Bill", - "description": "retrieve a single Bill by id.", - "operationId": "bills-read_Bill", + "tags": ["reimbursements"], + "summary": "Read Reimbursement", + "description": "retrieve a single Reimbursement by id.", + "operationId": "reimbursements-read_Reimbursement", + "security": [{ "HTTPBearer": [] }], "parameters": [ { - "name": "bill_id", - "in": "query", + "name": "Reimbursement_id", + "in": "path", "required": true, - "schema": { "type": "string", "format": "uuid", "title": "Bill Id" } + "schema": { + "type": "string", + "format": "uuid", + "title": "Reimbursement Id" + } } ], "responses": { @@ -1527,7 +2618,9 @@ "description": "Successful Response", "content": { "application/json": { - "schema": { "$ref": "#/components/schemas/BillPublic-Output" } + "schema": { + "$ref": "#/components/schemas/ReimbursementPublic-Output" + } } } }, @@ -1542,23 +2635,30 @@ } }, "patch": { - "tags": ["bills"], - "summary": "Update Bill", - "description": "update an Bill.", - "operationId": "bills-update_Bill", + "tags": ["reimbursements"], + "summary": "Update Reimbursement", + "description": "update an Reimbursement.", + "operationId": "reimbursements-update_Reimbursement", + "security": [{ "HTTPBearer": [] }], "parameters": [ { - "name": "Bill_id", - "in": "path", + "name": "reimbursement_id", + "in": "query", "required": true, - "schema": { "type": "string", "format": "uuid", "title": "Bill Id" } + "schema": { + "type": "string", + "format": "uuid", + "title": "Reimbursement Id" + } } ], "requestBody": { "required": true, "content": { "application/json": { - "schema": { "$ref": "#/components/schemas/BillPublic-Input" } + "schema": { + "$ref": "#/components/schemas/ReimbursementPublic-Input" + } } } }, @@ -1567,7 +2667,9 @@ "description": "Successful Response", "content": { "application/json": { - "schema": { "$ref": "#/components/schemas/BillPublic-Output" } + "schema": { + "$ref": "#/components/schemas/ReimbursementPublic-Output" + } } } }, @@ -1582,16 +2684,21 @@ } }, "delete": { - "tags": ["bills"], - "summary": "Delete Bill", - "description": "delete an Bill.", - "operationId": "bills-delete_Bill", + "tags": ["reimbursements"], + "summary": "Delete Reimbursement", + "description": "delete an Reimbursement.", + "operationId": "reimbursements-delete_Reimbursement", + "security": [{ "HTTPBearer": [] }], "parameters": [ { - "name": "Bill_id", - "in": "path", + "name": "reimbursement_id", + "in": "query", "required": true, - "schema": { "type": "string", "format": "uuid", "title": "Bill Id" } + "schema": { + "type": "string", + "format": "uuid", + "title": "Reimbursement Id" + } } ], "responses": { @@ -1599,7 +2706,7 @@ "description": "Successful Response", "content": { "application/json": { - "schema": { "$ref": "#/components/schemas/Bill" } + "schema": { "$ref": "#/components/schemas/Reimbursement" } } } }, @@ -1614,12 +2721,12 @@ } } }, - "/api/reimbursements/": { + "/api/creditPayments/": { "get": { - "tags": ["reimbursements"], - "summary": "Read Reimbursements", - "description": "retrieve all Reimbursementes, sorted by name.\npaginate the results.", - "operationId": "reimbursements-read_Reimbursements", + "tags": ["creditPayments"], + "summary": "Read Creditpayments", + "description": "retrieve all CreditPaymentes, sorted by name.\npaginate the results.", + "operationId": "creditPayments-read_creditPayments", "security": [{ "HTTPBearer": [] }], "parameters": [ { @@ -1640,12 +2747,12 @@ } }, { - "name": "creditor", + "name": "search", "in": "query", "required": false, "schema": { "anyOf": [{ "type": "string" }, { "type": "null" }], - "title": "Creditor" + "title": "Search" } }, { @@ -1656,242 +2763,213 @@ "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Recipt" } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/ReimbursementsList" } - } + }, + { + "name": "card", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Card" } }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/HTTPValidationError" } - } + { + "name": "creator", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Creator" } - } - } - }, - "post": { - "tags": ["reimbursements"], - "summary": "Create Reimbursement", - "description": "create a new Reimbursement.", - "operationId": "reimbursements-create_Reimbursement", - "security": [{ "HTTPBearer": [] }], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/ReimbursementCreate" } + }, + { + "name": "name", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Name" } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ReimbursementPublic-Output" - } - } + }, + { + "name": "creditor__search", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Creditor Search" } }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/HTTPValidationError" } - } + { + "name": "creditor__kst__search", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Creditor Kst Search" } - } - } - } - }, - "/api/reimbursements/{Reimbursement_id}": { - "get": { - "tags": ["reimbursements"], - "summary": "Read Reimbursement", - "description": "retrieve a single Reimbursement by id.", - "operationId": "reimbursements-read_Reimbursement", - "security": [{ "HTTPBearer": [] }], - "parameters": [ + }, { - "name": "Reimbursement_id", - "in": "path", - "required": true, + "name": "creditor__kst__kst_number", + "in": "query", + "required": false, "schema": { - "type": "string", - "format": "uuid", - "title": "Reimbursement Id" + "anyOf": [{ "type": "integer" }, { "type": "null" }], + "title": "Creditor Kst Kst Number" } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ReimbursementPublic-Output" - } - } + }, + { + "name": "creditor__kst__name_de", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Creditor Kst Name De" } }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/HTTPValidationError" } - } + { + "name": "creditor__kst__name_en", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Creditor Kst Name En" } - } - } - }, - "patch": { - "tags": ["reimbursements"], - "summary": "Update Reimbursement", - "description": "update an Reimbursement.", - "operationId": "reimbursements-update_Reimbursement", - "security": [{ "HTTPBearer": [] }], - "parameters": [ + }, { - "name": "reimbursement_id", + "name": "creditor__kst__owner", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Creditor Kst Owner" + } + }, + { + "name": "creditor__kst__active", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "boolean" }, { "type": "null" }], + "title": "Creditor Kst Active" + } + }, + { + "name": "creditor__kst__budget_plus", "in": "query", - "required": true, + "required": false, "schema": { - "type": "string", - "format": "uuid", - "title": "Reimbursement Id" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ReimbursementPublic-Input" - } + "anyOf": [{ "type": "integer" }, { "type": "null" }], + "title": "Creditor Kst Budget Plus" } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ReimbursementPublic-Output" - } - } + }, + { + "name": "creditor__kst__budget_minus", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "integer" }, { "type": "null" }], + "title": "Creditor Kst Budget Minus" } }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/HTTPValidationError" } - } + { + "name": "creditor__ledger__search", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Creditor Ledger Search" } - } - } - }, - "delete": { - "tags": ["reimbursements"], - "summary": "Delete Reimbursement", - "description": "delete an Reimbursement.", - "operationId": "reimbursements-delete_Reimbursement", - "security": [{ "HTTPBearer": [] }], - "parameters": [ + }, { - "name": "reimbursement_id", + "name": "creditor__ledger__accountnumber", "in": "query", - "required": true, + "required": false, "schema": { - "type": "string", - "format": "uuid", - "title": "Reimbursement Id" + "anyOf": [{ "type": "integer" }, { "type": "null" }], + "title": "Creditor Ledger Accountnumber" } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/Reimbursement" } - } + }, + { + "name": "creditor__ledger__namede", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Creditor Ledger Namede" } }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/HTTPValidationError" } - } + { + "name": "creditor__ledger__nameen", + "in": "query", + "required": false, + "schema": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Creditor Ledger Nameen" } - } - } - } - }, - "/api/creditPayments/": { - "get": { - "tags": ["creditPayments"], - "summary": "Read Creditpayments", - "description": "retrieve all CreditPaymentes, sorted by name.\npaginate the results.", - "operationId": "creditPayments-read_creditPayments", - "parameters": [ + }, { - "name": "page", + "name": "creditor__amount", "in": "query", "required": false, - "schema": { "type": "integer", "default": 0, "title": "Page" } + "schema": { + "anyOf": [{ "type": "integer" }, { "type": "null" }], + "title": "Creditor Amount" + } }, { - "name": "limit", + "name": "creditor__accounting_year", "in": "query", "required": false, "schema": { - "type": "integer", - "maximum": 1000, - "default": 100, - "title": "Limit" + "anyOf": [{ "type": "integer" }, { "type": "null" }], + "title": "Creditor Accounting Year" } }, { - "name": "creditor", + "name": "creditor__currency", "in": "query", "required": false, "schema": { - "anyOf": [{ "type": "string" }, { "type": "null" }], - "title": "Creditor" + "anyOf": [ + { "$ref": "#/components/schemas/Currency" }, + { "type": "null" } + ], + "title": "Creditor Currency" } }, { - "name": "recipt", + "name": "creditor__comment", "in": "query", "required": false, "schema": { "anyOf": [{ "type": "string" }, { "type": "null" }], - "title": "Recipt" + "title": "Creditor Comment" } }, { - "name": "card", + "name": "creditor__qcomment", "in": "query", "required": false, "schema": { "anyOf": [{ "type": "string" }, { "type": "null" }], - "title": "Card" + "title": "Creditor Qcomment" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "anyOf": [ + { "$ref": "#/components/schemas/CreditorFilter" }, + { "type": "null" } + ], + "title": "Creditor" + } + } + } + }, "responses": { "200": { "description": "Successful Response", @@ -1916,6 +2994,7 @@ "summary": "Create Creditpayment", "description": "create a new CreditPayment.", "operationId": "creditPayments-create_creditPayment", + "security": [{ "HTTPBearer": [] }], "requestBody": { "required": true, "content": { @@ -1952,6 +3031,7 @@ "summary": "Read Creditpayment", "description": "retrieve a single CreditPayment by id.", "operationId": "creditPayments-read_creditPayment", + "security": [{ "HTTPBearer": [] }], "parameters": [ { "name": "creditPayment_id", @@ -1990,6 +3070,7 @@ "summary": "Update Creditpayment", "description": "update an CreditPayment.", "operationId": "creditPayments-update_creditPayment", + "security": [{ "HTTPBearer": [] }], "parameters": [ { "name": "creditPayment_id", @@ -2038,6 +3119,7 @@ "summary": "Delete Creditpayment", "description": "delete an CreditPayment.", "operationId": "creditPayments-delete_creditPayment", + "security": [{ "HTTPBearer": [] }], "parameters": [ { "name": "creditPayment_id", @@ -2081,7 +3163,8 @@ "description": "Successful Response", "content": { "application/json": { "schema": {} } } } - } + }, + "security": [{ "HTTPBearer": [] }] } }, "/api/files/upload": { @@ -2113,7 +3196,8 @@ } } } - } + }, + "security": [{ "HTTPBearer": [] }] } }, "/api/files/files/{file_id}": { @@ -2122,6 +3206,7 @@ "summary": "Get File", "description": "Generate a presigned URL for downloading the file from MinIO.", "operationId": "files-get_file", + "security": [{ "HTTPBearer": [] }], "parameters": [ { "name": "file_id", @@ -2160,6 +3245,7 @@ "summary": "Replace File", "description": "Replace an existing file in MinIO with a new file using the same UUID.", "operationId": "files-replace_file", + "security": [{ "HTTPBearer": [] }], "parameters": [ { "name": "file_id", @@ -2198,6 +3284,7 @@ "summary": "Delete File", "description": "Delete a file from MinIO.", "operationId": "files-delete_file", + "security": [{ "HTTPBearer": [] }], "parameters": [ { "name": "file_id", @@ -2230,7 +3317,8 @@ "description": "Successful Response", "content": { "application/json": { "schema": {} } } } - } + }, + "security": [{ "HTTPBearer": [] }] } }, "/api/login": { @@ -2497,13 +3585,13 @@ "type": "string", "format": "date-time", "title": "Time Create", - "default": "2024-12-08T15:17:58.788683" + "default": "2024-12-17T07:15:41.941766" }, "time_modified": { "type": "string", "format": "date-time", "title": "Time Modified", - "default": "2024-12-08T15:17:58.788710" + "default": "2024-12-17T07:15:41.941813" } }, "type": "object", @@ -2552,6 +3640,44 @@ ], "title": "AddressBase" }, + "AddressFilter": { + "properties": { + "search": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Search" + }, + "name": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Name" + }, + "address1": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Address1" + }, + "address2": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Address2" + }, + "address3": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Address3" + }, + "city": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "City" + }, + "country": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Country" + }, + "plz": { + "anyOf": [{ "type": "integer" }, { "type": "null" }], + "title": "Plz" + } + }, + "type": "object", + "title": "AddressFilter" + }, "AddressPublic": { "properties": { "name": { "type": "string", "maxLength": 30, "title": "Name" }, @@ -2646,13 +3772,13 @@ "type": "string", "format": "date-time", "title": "Time Create", - "default": "2024-12-08T15:17:58.816295" + "default": "2024-12-17T07:15:42.004265" }, "time_modified": { "type": "string", "format": "date-time", "title": "Time Modified", - "default": "2024-12-08T15:17:58.816322" + "default": "2024-12-17T07:15:42.004313" }, "ezag_timestamp": { "anyOf": [ @@ -2797,6 +3923,42 @@ "required": ["file"], "title": "Body_files-upload_file" }, + "Body_internalTransfers-read_InternalTransferes": { + "properties": { + "debitor": { + "anyOf": [ + { "$ref": "#/components/schemas/DebitorFilter" }, + { "type": "null" } + ] + }, + "creditor": { + "anyOf": [ + { "$ref": "#/components/schemas/CreditorFilter" }, + { "type": "null" } + ] + } + }, + "type": "object", + "title": "Body_internalTransfers-read_InternalTransferes" + }, + "Body_invoices-read_Invoices": { + "properties": { + "kst": { + "anyOf": [ + { "$ref": "#/components/schemas/KstFilter" }, + { "type": "null" } + ] + }, + "debitor": { + "anyOf": [ + { "$ref": "#/components/schemas/DebitorFilter" }, + { "type": "null" } + ] + } + }, + "type": "object", + "title": "Body_invoices-read_Invoices" + }, "Card": { "type": "string", "enum": ["Events", "President", "Quaestor"], @@ -2817,13 +3979,13 @@ "type": "string", "format": "date-time", "title": "Time Create", - "default": "2024-12-08T15:17:58.826441" + "default": "2024-12-17T07:15:42.022361" }, "time_modified": { "type": "string", "format": "date-time", "title": "Time Modified", - "default": "2024-12-08T15:17:58.826463" + "default": "2024-12-17T07:15:42.022401" }, "ezag_timestamp": { "anyOf": [ @@ -2961,6 +4123,50 @@ "required": ["kst_id", "ledger_id", "amount", "currency"], "title": "CreditorBase" }, + "CreditorFilter": { + "properties": { + "search": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Search" + }, + "kst": { + "anyOf": [ + { "$ref": "#/components/schemas/KstFilter" }, + { "type": "null" } + ] + }, + "ledger": { + "anyOf": [ + { "$ref": "#/components/schemas/LedgerFilter" }, + { "type": "null" } + ] + }, + "amount": { + "anyOf": [{ "type": "integer" }, { "type": "null" }], + "title": "Amount" + }, + "accounting_year": { + "anyOf": [{ "type": "integer" }, { "type": "null" }], + "title": "Accounting Year" + }, + "currency": { + "anyOf": [ + { "$ref": "#/components/schemas/Currency" }, + { "type": "null" } + ] + }, + "comment": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Comment" + }, + "qcomment": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Qcomment" + } + }, + "type": "object", + "title": "CreditorFilter" + }, "CreditorPublic": { "properties": { "kst_id": { "type": "string", "format": "uuid", "title": "Kst Id" }, @@ -3007,6 +4213,7 @@ "DbUserBase": { "properties": { "amiv_id": { "type": "string", "maxLength": 30, "title": "Amiv Id" }, + "handle": { "type": "string", "maxLength": 30, "title": "Handle" }, "address_id": { "type": "string", "format": "uuid", @@ -3015,7 +4222,7 @@ "iban": { "type": "string", "maxLength": 30, "title": "Iban" } }, "type": "object", - "required": ["amiv_id", "address_id", "iban"], + "required": ["amiv_id", "handle", "address_id", "iban"], "title": "DbUserBase" }, "DbUserCreate": { @@ -3031,6 +4238,7 @@ "DbUserPublic": { "properties": { "amiv_id": { "type": "string", "maxLength": 30, "title": "Amiv Id" }, + "handle": { "type": "string", "maxLength": 30, "title": "Handle" }, "address_id": { "type": "string", "format": "uuid", @@ -3040,7 +4248,7 @@ "address": { "$ref": "#/components/schemas/AddressPublic" } }, "type": "object", - "required": ["amiv_id", "address_id", "iban", "address"], + "required": ["amiv_id", "handle", "address_id", "iban", "address"], "title": "DbUserPublic" }, "DbUsersList": { @@ -3079,20 +4287,27 @@ }, "DebitorFilter": { "properties": { - "kst": { + "search": { "anyOf": [{ "type": "string" }, { "type": "null" }], - "title": "Kst" + "title": "Search" + }, + "kst": { + "anyOf": [ + { "$ref": "#/components/schemas/KstFilter" }, + { "type": "null" } + ] }, "ledger": { - "anyOf": [{ "type": "string" }, { "type": "null" }], - "title": "Ledger" + "anyOf": [ + { "$ref": "#/components/schemas/LedgerFilter" }, + { "type": "null" } + ] }, "mwst": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Mwst" } }, - "additionalProperties": false, "type": "object", "title": "DebitorFilter" }, @@ -3158,13 +4373,13 @@ "type": "string", "format": "date-time", "title": "Time Create", - "default": "2024-12-08T15:17:58.851861" + "default": "2024-12-17T07:15:42.072845" }, "time_modified": { "type": "string", "format": "date-time", "title": "Time Modified", - "default": "2024-12-08T15:17:58.851884" + "default": "2024-12-17T07:15:42.072959" } }, "type": "object", @@ -3276,23 +4491,21 @@ "title": "Payinterval", "default": 30 }, - "adress": { "type": "string", "maxLength": 30, "title": "Adress" }, "id": { "type": "string", "format": "uuid", "title": "Id" }, "time_create": { "type": "string", "format": "date-time", "title": "Time Create", - "default": "2024-12-08T15:17:58.863957" + "default": "2024-12-17T07:15:42.100202" }, "time_modified": { "type": "string", "format": "date-time", "title": "Time Modified", - "default": "2024-12-08T15:17:58.863988" + "default": "2024-12-17T07:15:42.100290" } }, "type": "object", - "required": ["adress"], "title": "Invoice" }, "InvoiceCreate": { @@ -3302,7 +4515,6 @@ "title": "Payinterval", "default": 30 }, - "adress": { "type": "string", "maxLength": 30, "title": "Adress" }, "items": { "items": { "$ref": "#/components/schemas/ItemstoInvoiceCreate" }, "type": "array", @@ -3310,7 +4522,7 @@ } }, "type": "object", - "required": ["adress", "items"], + "required": ["items"], "title": "InvoiceCreate" }, "InvoicePublic-Input": { @@ -3320,7 +4532,6 @@ "title": "Payinterval", "default": 30 }, - "adress": { "type": "string", "maxLength": 30, "title": "Adress" }, "id": { "type": "string", "format": "uuid", "title": "Id" }, "time_create": { "type": "string", @@ -3339,7 +4550,7 @@ } }, "type": "object", - "required": ["adress", "items"], + "required": ["items"], "title": "InvoicePublic" }, "InvoicePublic-Output": { @@ -3349,7 +4560,6 @@ "title": "Payinterval", "default": 30 }, - "adress": { "type": "string", "maxLength": 30, "title": "Adress" }, "id": { "type": "string", "format": "uuid", "title": "Id" }, "time_create": { "type": "string", @@ -3368,7 +4578,7 @@ } }, "type": "object", - "required": ["adress", "items"], + "required": ["items"], "title": "InvoicePublic" }, "InvoicesList": { @@ -3421,13 +4631,13 @@ "type": "string", "format": "date-time", "title": "Time Create", - "default": "2024-12-08T15:17:58.835094" + "default": "2024-12-17T07:15:42.041207" }, "time_modified": { "type": "string", "format": "date-time", "title": "Time Modified", - "default": "2024-12-08T15:17:58.835120" + "default": "2024-12-17T07:15:42.041260" } }, "type": "object", @@ -3580,13 +4790,13 @@ "type": "string", "format": "date-time", "title": "Time Create", - "default": "2024-12-08T15:17:58.797270" + "default": "2024-12-17T07:15:41.960935" }, "time_modified": { "type": "string", "format": "date-time", "title": "Time Modified", - "default": "2024-12-08T15:17:58.797294" + "default": "2024-12-17T07:15:41.960981" } }, "type": "object", @@ -3621,6 +4831,44 @@ ], "title": "KstBase" }, + "KstFilter": { + "properties": { + "search": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Search" + }, + "kst_number": { + "anyOf": [{ "type": "integer" }, { "type": "null" }], + "title": "Kst Number" + }, + "name_de": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Name De" + }, + "name_en": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Name En" + }, + "owner": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Owner" + }, + "active": { + "anyOf": [{ "type": "boolean" }, { "type": "null" }], + "title": "Active" + }, + "budget_plus": { + "anyOf": [{ "type": "integer" }, { "type": "null" }], + "title": "Budget Plus" + }, + "budget_minus": { + "anyOf": [{ "type": "integer" }, { "type": "null" }], + "title": "Budget Minus" + } + }, + "type": "object", + "title": "KstFilter" + }, "KstPublic": { "properties": { "kst_number": { "type": "integer", "title": "Kst Number" }, @@ -3674,13 +4922,13 @@ "type": "string", "format": "date-time", "title": "Time Create", - "default": "2024-12-08T15:17:58.803888" + "default": "2024-12-17T07:15:41.975225" }, "time_modified": { "type": "string", "format": "date-time", "title": "Time Modified", - "default": "2024-12-08T15:17:58.803912" + "default": "2024-12-17T07:15:41.975271" } }, "type": "object", @@ -3702,6 +4950,28 @@ "required": ["namede", "nameen", "owner"], "title": "LedgerBase" }, + "LedgerFilter": { + "properties": { + "search": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Search" + }, + "accountnumber": { + "anyOf": [{ "type": "integer" }, { "type": "null" }], + "title": "Accountnumber" + }, + "namede": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Namede" + }, + "nameen": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Nameen" + } + }, + "type": "object", + "title": "LedgerFilter" + }, "LedgerPublic": { "properties": { "accountnumber": { @@ -3747,13 +5017,13 @@ "type": "string", "format": "date-time", "title": "Time Create", - "default": "2024-12-08T15:17:58.874167" + "default": "2024-12-17T07:15:42.120457" }, "time_modified": { "type": "string", "format": "date-time", "title": "Time Modified", - "default": "2024-12-08T15:17:58.874192" + "default": "2024-12-17T07:15:42.120511" }, "ezag_timestamp": { "anyOf": [ @@ -3783,12 +5053,13 @@ "ReimbursementCreate": { "properties": { "creditor": { "$ref": "#/components/schemas/CreditorBase" }, + "name": { "type": "string", "title": "Name" }, "recipt": { "type": "string", "title": "Recipt" }, "creator": { "type": "string", "title": "Creator" }, "recipient": { "type": "string", "title": "Recipient" } }, "type": "object", - "required": ["creditor", "recipt", "creator", "recipient"], + "required": ["creditor", "name", "recipt", "creator", "recipient"], "title": "ReimbursementCreate" }, "ReimbursementPublic-Input": { diff --git a/package.json b/package.json index 3ce9f35319be0f70e4cd98baa836d54477fd9a41..446eac4613b5b1723bfdc6e4e45ee6b0a342d86e 100644 --- a/package.json +++ b/package.json @@ -16,11 +16,12 @@ "@mui/base": "^5.0.0-beta.61", "@mui/icons-material": "^6.1.6", "@mui/material": "^6.1.6", - "@mui/x-date-pickers":"^7.23.0", + "@mui/x-date-pickers": "^7.23.0", "@vitejs/plugin-react": "^4.3.3", "dayjs": "^1.11.13", "esnext": "^3.3.1", "mui": "^0.0.1", + "mui-datatables": "^4.3.0", "node": "^22.11.0", "react": "^18.3.1", "react-dom": "^18.3.1", diff --git a/src/client/schemas.gen.ts b/src/client/schemas.gen.ts index 34ee6635ff104dd3166cb12d4dd5f7ec2b28a879..62296a9128a1fc2774aca6409566582c43bfa097 100644 --- a/src/client/schemas.gen.ts +++ b/src/client/schemas.gen.ts @@ -45,13 +45,13 @@ export const AddressSchema = { type: "string", format: "date-time", title: "Time Create", - default: "2024-12-08T15:17:58.788683", + default: "2024-12-17T07:15:41.941766", }, time_modified: { type: "string", format: "date-time", title: "Time Modified", - default: "2024-12-08T15:17:58.788710", + default: "2024-12-17T07:15:41.941813", }, }, type: "object", @@ -117,6 +117,101 @@ export const AddressBaseSchema = { title: "AddressBase", } as const; +export const AddressFilterSchema = { + properties: { + search: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Search", + }, + name: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Name", + }, + address1: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Address1", + }, + address2: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Address2", + }, + address3: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Address3", + }, + city: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "City", + }, + country: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Country", + }, + plz: { + anyOf: [ + { + type: "integer", + }, + { + type: "null", + }, + ], + title: "Plz", + }, + }, + type: "object", + title: "AddressFilter", +} as const; + export const AddressPublicSchema = { properties: { name: { @@ -269,13 +364,13 @@ export const BillSchema = { type: "string", format: "date-time", title: "Time Create", - default: "2024-12-08T15:17:58.816295", + default: "2024-12-17T07:15:42.004265", }, time_modified: { type: "string", format: "date-time", title: "Time Modified", - default: "2024-12-08T15:17:58.816322", + default: "2024-12-17T07:15:42.004313", }, ezag_timestamp: { anyOf: [ @@ -496,6 +591,60 @@ export const Body_files_upload_fileSchema = { title: "Body_files-upload_file", } as const; +export const Body_internalTransfers_read_InternalTransferesSchema = { + properties: { + debitor: { + anyOf: [ + { + $ref: "#/components/schemas/DebitorFilter", + }, + { + type: "null", + }, + ], + }, + creditor: { + anyOf: [ + { + $ref: "#/components/schemas/CreditorFilter", + }, + { + type: "null", + }, + ], + }, + }, + type: "object", + title: "Body_internalTransfers-read_InternalTransferes", +} as const; + +export const Body_invoices_read_InvoicesSchema = { + properties: { + kst: { + anyOf: [ + { + $ref: "#/components/schemas/KstFilter", + }, + { + type: "null", + }, + ], + }, + debitor: { + anyOf: [ + { + $ref: "#/components/schemas/DebitorFilter", + }, + { + type: "null", + }, + ], + }, + }, + type: "object", + title: "Body_invoices-read_Invoices", +} as const; + export const CardSchema = { type: "string", enum: ["Events", "President", "Quaestor"], @@ -531,13 +680,13 @@ export const CreditPaymentSchema = { type: "string", format: "date-time", title: "Time Create", - default: "2024-12-08T15:17:58.826441", + default: "2024-12-17T07:15:42.022361", }, time_modified: { type: "string", format: "date-time", title: "Time Modified", - default: "2024-12-08T15:17:58.826463", + default: "2024-12-17T07:15:42.022401", }, ezag_timestamp: { anyOf: [ @@ -751,6 +900,98 @@ export const CreditorBaseSchema = { title: "CreditorBase", } as const; +export const CreditorFilterSchema = { + properties: { + search: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Search", + }, + kst: { + anyOf: [ + { + $ref: "#/components/schemas/KstFilter", + }, + { + type: "null", + }, + ], + }, + ledger: { + anyOf: [ + { + $ref: "#/components/schemas/LedgerFilter", + }, + { + type: "null", + }, + ], + }, + amount: { + anyOf: [ + { + type: "integer", + }, + { + type: "null", + }, + ], + title: "Amount", + }, + accounting_year: { + anyOf: [ + { + type: "integer", + }, + { + type: "null", + }, + ], + title: "Accounting Year", + }, + currency: { + anyOf: [ + { + $ref: "#/components/schemas/Currency", + }, + { + type: "null", + }, + ], + }, + comment: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Comment", + }, + qcomment: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Qcomment", + }, + }, + type: "object", + title: "CreditorFilter", +} as const; + export const CreditorPublicSchema = { properties: { kst_id: { @@ -813,6 +1054,11 @@ export const DbUserBaseSchema = { maxLength: 30, title: "Amiv Id", }, + handle: { + type: "string", + maxLength: 30, + title: "Handle", + }, address_id: { type: "string", format: "uuid", @@ -825,7 +1071,7 @@ export const DbUserBaseSchema = { }, }, type: "object", - required: ["amiv_id", "address_id", "iban"], + required: ["amiv_id", "handle", "address_id", "iban"], title: "DbUserBase", } as const; @@ -855,6 +1101,11 @@ export const DbUserPublicSchema = { maxLength: 30, title: "Amiv Id", }, + handle: { + type: "string", + maxLength: 30, + title: "Handle", + }, address_id: { type: "string", format: "uuid", @@ -870,7 +1121,7 @@ export const DbUserPublicSchema = { }, }, type: "object", - required: ["amiv_id", "address_id", "iban", "address"], + required: ["amiv_id", "handle", "address_id", "iban", "address"], title: "DbUserPublic", } as const; @@ -928,7 +1179,7 @@ export const DebitorBaseSchema = { export const DebitorFilterSchema = { properties: { - kst: { + search: { anyOf: [ { type: "string", @@ -937,18 +1188,27 @@ export const DebitorFilterSchema = { type: "null", }, ], - title: "Kst", + title: "Search", + }, + kst: { + anyOf: [ + { + $ref: "#/components/schemas/KstFilter", + }, + { + type: "null", + }, + ], }, ledger: { anyOf: [ { - type: "string", + $ref: "#/components/schemas/LedgerFilter", }, { type: "null", }, ], - title: "Ledger", }, mwst: { anyOf: [ @@ -962,7 +1222,6 @@ export const DebitorFilterSchema = { title: "Mwst", }, }, - additionalProperties: false, type: "object", title: "DebitorFilter", } as const; @@ -1053,13 +1312,13 @@ export const InternalTransferSchema = { type: "string", format: "date-time", title: "Time Create", - default: "2024-12-08T15:17:58.851861", + default: "2024-12-17T07:15:42.072845", }, time_modified: { type: "string", format: "date-time", title: "Time Modified", - default: "2024-12-08T15:17:58.851884", + default: "2024-12-17T07:15:42.072959", }, }, type: "object", @@ -1219,11 +1478,6 @@ export const InvoiceSchema = { title: "Payinterval", default: 30, }, - adress: { - type: "string", - maxLength: 30, - title: "Adress", - }, id: { type: "string", format: "uuid", @@ -1233,17 +1487,16 @@ export const InvoiceSchema = { type: "string", format: "date-time", title: "Time Create", - default: "2024-12-08T15:17:58.863957", + default: "2024-12-17T07:15:42.100202", }, time_modified: { type: "string", format: "date-time", title: "Time Modified", - default: "2024-12-08T15:17:58.863988", + default: "2024-12-17T07:15:42.100290", }, }, type: "object", - required: ["adress"], title: "Invoice", } as const; @@ -1254,11 +1507,6 @@ export const InvoiceCreateSchema = { title: "Payinterval", default: 30, }, - adress: { - type: "string", - maxLength: 30, - title: "Adress", - }, items: { items: { $ref: "#/components/schemas/ItemstoInvoiceCreate", @@ -1268,7 +1516,7 @@ export const InvoiceCreateSchema = { }, }, type: "object", - required: ["adress", "items"], + required: ["items"], title: "InvoiceCreate", } as const; @@ -1279,11 +1527,6 @@ export const InvoicePublic_InputSchema = { title: "Payinterval", default: 30, }, - adress: { - type: "string", - maxLength: 30, - title: "Adress", - }, id: { type: "string", format: "uuid", @@ -1308,7 +1551,7 @@ export const InvoicePublic_InputSchema = { }, }, type: "object", - required: ["adress", "items"], + required: ["items"], title: "InvoicePublic", } as const; @@ -1319,11 +1562,6 @@ export const InvoicePublic_OutputSchema = { title: "Payinterval", default: 30, }, - adress: { - type: "string", - maxLength: 30, - title: "Adress", - }, id: { type: "string", format: "uuid", @@ -1348,7 +1586,7 @@ export const InvoicePublic_OutputSchema = { }, }, type: "object", - required: ["adress", "items"], + required: ["items"], title: "InvoicePublic", } as const; @@ -1423,13 +1661,13 @@ export const ItemSchema = { type: "string", format: "date-time", title: "Time Create", - default: "2024-12-08T15:17:58.835094", + default: "2024-12-17T07:15:42.041207", }, time_modified: { type: "string", format: "date-time", title: "Time Modified", - default: "2024-12-08T15:17:58.835120", + default: "2024-12-17T07:15:42.041260", }, }, type: "object", @@ -1667,13 +1905,13 @@ export const KstSchema = { type: "string", format: "date-time", title: "Time Create", - default: "2024-12-08T15:17:58.797270", + default: "2024-12-17T07:15:41.960935", }, time_modified: { type: "string", format: "date-time", title: "Time Modified", - default: "2024-12-08T15:17:58.797294", + default: "2024-12-17T07:15:41.960981", }, }, type: "object", @@ -1735,6 +1973,101 @@ export const KstBaseSchema = { title: "KstBase", } as const; +export const KstFilterSchema = { + properties: { + search: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Search", + }, + kst_number: { + anyOf: [ + { + type: "integer", + }, + { + type: "null", + }, + ], + title: "Kst Number", + }, + name_de: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Name De", + }, + name_en: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Name En", + }, + owner: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Owner", + }, + active: { + anyOf: [ + { + type: "boolean", + }, + { + type: "null", + }, + ], + title: "Active", + }, + budget_plus: { + anyOf: [ + { + type: "integer", + }, + { + type: "null", + }, + ], + title: "Budget Plus", + }, + budget_minus: { + anyOf: [ + { + type: "integer", + }, + { + type: "null", + }, + ], + title: "Budget Minus", + }, + }, + type: "object", + title: "KstFilter", +} as const; + export const KstPublicSchema = { properties: { kst_number: { @@ -1843,13 +2176,13 @@ export const LedgerSchema = { type: "string", format: "date-time", title: "Time Create", - default: "2024-12-08T15:17:58.803888", + default: "2024-12-17T07:15:41.975225", }, time_modified: { type: "string", format: "date-time", title: "Time Modified", - default: "2024-12-08T15:17:58.803912", + default: "2024-12-17T07:15:41.975271", }, }, type: "object", @@ -1885,6 +2218,57 @@ export const LedgerBaseSchema = { title: "LedgerBase", } as const; +export const LedgerFilterSchema = { + properties: { + search: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Search", + }, + accountnumber: { + anyOf: [ + { + type: "integer", + }, + { + type: "null", + }, + ], + title: "Accountnumber", + }, + namede: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Namede", + }, + nameen: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Nameen", + }, + }, + type: "object", + title: "LedgerFilter", +} as const; + export const LedgerPublicSchema = { properties: { accountnumber: { @@ -1968,13 +2352,13 @@ export const ReimbursementSchema = { type: "string", format: "date-time", title: "Time Create", - default: "2024-12-08T15:17:58.874167", + default: "2024-12-17T07:15:42.120457", }, time_modified: { type: "string", format: "date-time", title: "Time Modified", - default: "2024-12-08T15:17:58.874192", + default: "2024-12-17T07:15:42.120511", }, ezag_timestamp: { anyOf: [ @@ -2021,6 +2405,10 @@ export const ReimbursementCreateSchema = { creditor: { $ref: "#/components/schemas/CreditorBase", }, + name: { + type: "string", + title: "Name", + }, recipt: { type: "string", title: "Recipt", @@ -2035,7 +2423,7 @@ export const ReimbursementCreateSchema = { }, }, type: "object", - required: ["creditor", "recipt", "creator", "recipient"], + required: ["creditor", "name", "recipt", "creator", "recipient"], title: "ReimbursementCreate", } as const; diff --git a/src/client/types.gen.ts b/src/client/types.gen.ts index 0530df4e6d62781d63adc109d83b960e601d5501..92c4c05325d5850729b98657120ee971414a1aa7 100644 --- a/src/client/types.gen.ts +++ b/src/client/types.gen.ts @@ -29,6 +29,17 @@ export type AddressesPublic = { total: number; }; +export type AddressFilter = { + search?: string | null; + name?: string | null; + address1?: string | null; + address2?: string | null; + address3?: string | null; + city?: string | null; + country?: string | null; + plz?: number | null; +}; + export type AddressPublic = { name: string; address1: string; @@ -109,6 +120,16 @@ export type Body_files_upload_file = { file: Blob | File; }; +export type Body_internalTransfers_read_InternalTransferes = { + debitor?: DebitorFilter | null; + creditor?: CreditorFilter | null; +}; + +export type Body_invoices_read_Invoices = { + kst?: KstFilter | null; + debitor?: DebitorFilter | null; +}; + export type Card = "Events" | "President" | "Quaestor"; export const Card = { @@ -127,6 +148,17 @@ export type CreditorBase = { qcomment?: string; }; +export type CreditorFilter = { + search?: string | null; + kst?: KstFilter | null; + ledger?: LedgerFilter | null; + amount?: number | null; + accounting_year?: number | null; + currency?: Currency | null; + comment?: string | null; + qcomment?: string | null; +}; + export type CreditorPublic = { kst_id: string; ledger_id: string; @@ -194,6 +226,7 @@ export const Currency = { export type DbUserBase = { amiv_id: string; + handle: string; address_id: string; iban: string; }; @@ -206,6 +239,7 @@ export type DbUserCreate = { export type DbUserPublic = { amiv_id: string; + handle: string; address_id: string; iban: string; address: AddressPublic; @@ -225,8 +259,9 @@ export type DebitorBase = { }; export type DebitorFilter = { - kst?: string | null; - ledger?: string | null; + search?: string | null; + kst?: KstFilter | null; + ledger?: LedgerFilter | null; mwst?: string | null; }; @@ -289,7 +324,6 @@ export type InternalTransfersList = { export type Invoice = { payinterval?: number; - adress: string; id?: string; time_create?: Date; time_modified?: Date; @@ -297,13 +331,11 @@ export type Invoice = { export type InvoiceCreate = { payinterval?: number; - adress: string; items: Array<ItemstoInvoiceCreate>; }; export type InvoicePublic_Input = { payinterval?: number; - adress: string; id?: string; time_create?: Date; time_modified?: Date; @@ -312,7 +344,6 @@ export type InvoicePublic_Input = { export type InvoicePublic_Output = { payinterval?: number; - adress: string; id?: string; time_create?: Date; time_modified?: Date; @@ -402,6 +433,17 @@ export type KstBase = { budget_minus: number; }; +export type KstFilter = { + search?: string | null; + kst_number?: number | null; + name_de?: string | null; + name_en?: string | null; + owner?: string | null; + active?: boolean | null; + budget_plus?: number | null; + budget_minus?: number | null; +}; + export type KstPublic = { kst_number: number; name_de: string; @@ -436,6 +478,13 @@ export type LedgerBase = { owner: string; }; +export type LedgerFilter = { + search?: string | null; + accountnumber?: number | null; + namede?: string | null; + nameen?: string | null; +}; + export type LedgerPublic = { accountnumber?: number; namede: string; @@ -465,6 +514,7 @@ export type Reimbursement = { export type ReimbursementCreate = { creditor: CreditorBase; + name: string; recipt: string; creator: string; recipient: string; @@ -565,16 +615,36 @@ export type InvoicesReadInvoiceResponse = InvoicePublic_Output; export type InvoicesReadInvoiceError = HTTPValidationError; export type InvoicesReadInvoicesData = { - body?: DebitorFilter | null; + body?: Body_invoices_read_Invoices; query?: { - adress?: string | null; comment?: string | null; - items?: string | null; - kst?: string | null; + debitor__kst__active?: boolean | null; + debitor__kst__budget_minus?: number | null; + debitor__kst__budget_plus?: number | null; + debitor__kst__kst_number?: number | null; + debitor__kst__name_de?: string | null; + debitor__kst__name_en?: string | null; + debitor__kst__owner?: string | null; + debitor__kst__search?: string | null; + debitor__ledger__accountnumber?: number | null; + debitor__ledger__namede?: string | null; + debitor__ledger__nameen?: string | null; + debitor__ledger__search?: string | null; + debitor__mwst?: string | null; + debitor__search?: string | null; + kst__active?: boolean | null; + kst__budget_minus?: number | null; + kst__budget_plus?: number | null; + kst__kst_number?: number | null; + kst__name_de?: string | null; + kst__name_en?: string | null; + kst__owner?: string | null; + kst__search?: string | null; limit?: number; mwst?: string | null; page?: number; payinterval?: number | null; + search?: string | null; time_create?: Date | null; time_modified?: Date | null; }; @@ -617,6 +687,8 @@ export type LedgersReadLedgersData = { query?: { accountnumber?: number | null; limit?: number; + namede?: string | null; + nameen?: string | null; page?: number; search?: string | null; }; @@ -667,8 +739,14 @@ export type LedgersDeleteLedgerError = HTTPValidationError; export type KstsReadKstsData = { query?: { - accountnumber?: number | null; + active?: boolean | null; + budget_minus?: number | null; + budget_plus?: number | null; + kst_number?: number | null; limit?: number; + name_de?: string | null; + name_en?: string | null; + owner?: string | null; page?: number; search?: string | null; }; @@ -719,9 +797,15 @@ export type KstsDeleteKstError = HTTPValidationError; export type AddressesReadAddressesData = { query?: { - accountnumber?: number | null; + address1?: string | null; + address2?: string | null; + address3?: string | null; + city?: string | null; + country?: string | null; limit?: number; + name?: string | null; page?: number; + plz?: number | null; search?: string | null; }; }; @@ -770,12 +854,44 @@ export type AddressesDeleteAddressResponse = Address; export type AddressesDeleteAddressError = HTTPValidationError; export type InternalTransfersReadInternalTransferesData = { + body?: Body_internalTransfers_read_InternalTransferes; query?: { amount?: string | null; - creditor?: string | null; - debitor?: string | null; + creditor__accounting_year?: number | null; + creditor__amount?: number | null; + creditor__comment?: string | null; + creditor__currency?: Currency | null; + creditor__kst__active?: boolean | null; + creditor__kst__budget_minus?: number | null; + creditor__kst__budget_plus?: number | null; + creditor__kst__kst_number?: number | null; + creditor__kst__name_de?: string | null; + creditor__kst__name_en?: string | null; + creditor__kst__owner?: string | null; + creditor__kst__search?: string | null; + creditor__ledger__accountnumber?: number | null; + creditor__ledger__namede?: string | null; + creditor__ledger__nameen?: string | null; + creditor__ledger__search?: string | null; + creditor__qcomment?: string | null; + creditor__search?: string | null; + debitor__kst__active?: boolean | null; + debitor__kst__budget_minus?: number | null; + debitor__kst__budget_plus?: number | null; + debitor__kst__kst_number?: number | null; + debitor__kst__name_de?: string | null; + debitor__kst__name_en?: string | null; + debitor__kst__owner?: string | null; + debitor__kst__search?: string | null; + debitor__ledger__accountnumber?: number | null; + debitor__ledger__namede?: string | null; + debitor__ledger__nameen?: string | null; + debitor__ledger__search?: string | null; + debitor__mwst?: string | null; + debitor__search?: string | null; limit?: number; page?: number; + search?: string | null; }; }; @@ -827,15 +943,23 @@ export type InternalTransfersDeleteInternalTransferResponse = InternalTransfer; export type InternalTransfersDeleteInternalTransferError = HTTPValidationError; export type BillsReadBillsData = { + body?: AddressFilter | null; query?: { - address?: string | null; + address__address1?: string | null; + address__address2?: string | null; + address__address3?: string | null; + address__city?: string | null; + address__country?: string | null; + address__name?: string | null; + address__plz?: number | null; + address__search?: string | null; comment?: string | null; - creditor?: string | null; iban?: string | null; limit?: number; page?: number; recipt?: string | null; reference?: string | null; + search?: string | null; }; }; @@ -883,11 +1007,30 @@ export type BillsDeleteBillResponse = Bill; export type BillsDeleteBillError = HTTPValidationError; export type ReimbursementsReadReimbursementsData = { + body?: CreditorFilter | null; query?: { - creditor?: string | null; + creditor__accounting_year?: number | null; + creditor__amount?: number | null; + creditor__comment?: string | null; + creditor__currency?: Currency | null; + creditor__kst__active?: boolean | null; + creditor__kst__budget_minus?: number | null; + creditor__kst__budget_plus?: number | null; + creditor__kst__kst_number?: number | null; + creditor__kst__name_de?: string | null; + creditor__kst__name_en?: string | null; + creditor__kst__owner?: string | null; + creditor__kst__search?: string | null; + creditor__ledger__accountnumber?: number | null; + creditor__ledger__namede?: string | null; + creditor__ledger__nameen?: string | null; + creditor__ledger__search?: string | null; + creditor__qcomment?: string | null; + creditor__search?: string | null; limit?: number; page?: number; recipt?: string | null; + search?: string | null; }; }; @@ -938,12 +1081,33 @@ export type ReimbursementsDeleteReimbursementResponse = Reimbursement; export type ReimbursementsDeleteReimbursementError = HTTPValidationError; export type CreditPaymentsReadCreditPaymentsData = { + body?: CreditorFilter | null; query?: { card?: string | null; - creditor?: string | null; + creator?: string | null; + creditor__accounting_year?: number | null; + creditor__amount?: number | null; + creditor__comment?: string | null; + creditor__currency?: Currency | null; + creditor__kst__active?: boolean | null; + creditor__kst__budget_minus?: number | null; + creditor__kst__budget_plus?: number | null; + creditor__kst__kst_number?: number | null; + creditor__kst__name_de?: string | null; + creditor__kst__name_en?: string | null; + creditor__kst__owner?: string | null; + creditor__kst__search?: string | null; + creditor__ledger__accountnumber?: number | null; + creditor__ledger__namede?: string | null; + creditor__ledger__nameen?: string | null; + creditor__ledger__search?: string | null; + creditor__qcomment?: string | null; + creditor__search?: string | null; limit?: number; + name?: string | null; page?: number; recipt?: string | null; + search?: string | null; }; }; diff --git a/src/components/GenericDataTable.tsx b/src/components/GenericDataTable.tsx new file mode 100644 index 0000000000000000000000000000000000000000..53ba01a1d57fcbd845082ff237ee149923b9c4a7 --- /dev/null +++ b/src/components/GenericDataTable.tsx @@ -0,0 +1,140 @@ +import React, { useEffect, useState } from "react"; +import MUIDataTable, { MUIDataTableOptions } from "mui-datatables"; +import { CacheProvider } from "@emotion/react"; +import createCache from "@emotion/cache"; +import { CircularProgress } from "@mui/material"; + +interface GenericDataTableProps { + title: string; + columns: []; + fetchData: (params: FetchParams) => Promise<any[]>; +} + +interface FetchParams { + search: string; + sort: { column: string; direction: "asc" | "desc" } | null; + filters: Record<string, any>; +} + +const muiCache = createCache({ + key: "mui-datatables", + prepend: true, +}); + +const GenericDataTable: React.FC<GenericDataTableProps> = ({ + title, + columns, + fetchData, +}) => { + const [data, setData] = useState<any[]>([]); + const [isInitialLoading, setIsInitialLoading] = useState(true); + const [isLoading, setIsLoading] = useState(false); + const [filters, setFilters] = useState<Record<string, any>>({}); + const [search, setSearch] = useState<string>(""); + const [sort, setSort] = useState<{ + column: string; + direction: "asc" | "desc"; + } | null>(null); + + const loadData = async () => { + if (data.length > 0) { + setIsLoading(true); // Incremental loading + } else { + setIsInitialLoading(true); // First-time load + } + + const params: FetchParams = { + search: search || "", + sort, + filters, + }; + + try { + const fetchedData = await fetchData(params); + setData(fetchedData); + } catch (error) { + console.error("Error fetching data:", error); + } finally { + setIsInitialLoading(false); + setIsLoading(false); + } + }; + + useEffect(() => { + loadData(); + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [filters, search, sort]); + + const options: MUIDataTableOptions = { + serverSide: true, + search: true, + searchText: search, + download: true, + print: true, + viewColumns: true, + filter: true, + filterType: "textField", + responsive: "vertical", + selectableRows: "none", + + onSearchChange: (newSearch: string | null) => { + setSearch(newSearch || ""); + }, + + onColumnSortChange: (changedColumn: string, direction: "asc" | "desc") => { + setSort({ column: changedColumn, direction }); + }, + + onFilterChange: (column: string, filterList: any) => { + const newFilters: Record<string, any> = {}; + + columns.forEach((col, index) => { + if (filterList[index]?.length > 0) { + newFilters[col.name as string] = filterList[index][0]; + } + }); + + setFilters(newFilters); + }, + }; + + return ( + <div style={{ position: "relative" }}> + {isInitialLoading && data.length === 0 ? ( + <div style={{ position: "absolute", top: "50%", left: "50%" }}> + <CircularProgress /> + </div> + ) : ( + <> + {/* Overlay Loading Spinner */} + {isLoading && ( + <div + style={{ + position: "absolute", + top: 0, + left: 0, + width: "100%", + height: "100%", + background: "rgba(0, 0, 0, 0.3)", + display: "flex", + justifyContent: "center", + alignItems: "center", + zIndex: 10, + }} + > + <CircularProgress /> + </div> + )} + <MUIDataTable + title={title} + data={data} + columns={columns} + options={options} + /> + </> + )} + </div> + ); +}; + +export default GenericDataTable; diff --git a/src/main.tsx b/src/main.tsx index 44b895834e86a460d9c6af28a6e5a5e36641d37c..44acc52aea5a572c502c84594f74b1b0fd03539b 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -10,10 +10,11 @@ import ThemeWrapper from "./ThemeWrapper"; import CreditPaymentsPage from "./pages/CreditPaymentsList"; import Callback from "./Callback"; -import CreditList from "./pages/CreditList"; +import CreditList, {addLoader as addCreditListLoader} from "./pages/CreditList"; import Belegformular, { addLoader as addCreditPaymentLoader, } from "./pages/Belegformular"; +import EditCreditPayment from "./pages/EditCreditPayment"; import GenerateItem from "./pages/GenerateItem"; import GenerateLedger from "./pages/GenerateLedger"; import InternalTransfer from "./pages/InternalTransfer"; @@ -50,11 +51,17 @@ const router = createBrowserRouter([ { path: "creditlist", element: <CreditList />, // Add this route + loader: addCreditListLoader, }, { path: "onboarding", element: <Onboarding />, // Add this route }, + { + path: "CreditPayment/:idstring", + element: <EditCreditPayment />, // Add this route + loader: addCreditPaymentLoader, + } ], }, { path: "callback", element: <Callback /> }, diff --git a/src/pages/Belegformular.tsx b/src/pages/Belegformular.tsx index 2c528eece1dce5c6459cb54e0514ea0ec358b0bb..8eeb520094ab97bb3038a1e58e03e3c9a755f3f8 100644 --- a/src/pages/Belegformular.tsx +++ b/src/pages/Belegformular.tsx @@ -18,6 +18,9 @@ import { ledgersReadLedgers, } from "../client/services.gen"; +import client from "../apiClientConfig"; +client.getConfig(); + export async function addLoader() { const kstlist = await kstsReadKsts({}); const kst = kstlist.data?.items || []; diff --git a/src/pages/CreditList.tsx b/src/pages/CreditList.tsx index c57479095ca473c5a574220ee4df24a1678068f8..9daebdabeb2efb17e163a11143cdab040ac1cebe 100644 --- a/src/pages/CreditList.tsx +++ b/src/pages/CreditList.tsx @@ -1,258 +1,115 @@ -import React, { useState, useEffect } from "react"; +import React from "react"; +import { useLoaderData } from "react-router-dom"; import { - Container, - CircularProgress, - Typography, - Table, - TableBody, - TableCell, - TableContainer, - TableHead, - TableRow, - Paper, - Alert, - TextField, - FormControl, - InputLabel, - Select, - MenuItem, -} from "@mui/material"; -import { client } from "../client/services.gen.ts"; -import { SelectChangeEvent } from "@mui/material/Select"; -import { - useFetchBills, - useFetchCreditPayments, - useFetchReimbursements, - useFetchKstItems, - useFetchLedgerItems, -} from "./FetchData.tsx"; -// Set the base URL and headers for the client -client.setConfig({ - baseUrl: import.meta.env.VITE_API_BASE_URL, - headers: { - Origin: `localhost`, - }, -}); - -export default function CreditList() { - const [originalPayments, setOriginalPayments] = useState([]); - const [filteredPayments, setFilteredPayments] = useState<any[]>([]); - - const [filters, setFilters] = useState({ - kstId: "", - ledgerId: "", - amount: "", - }); - - const mergeData = () => { - const merged = [ - ...bills.map((item) => ({ - ...item, - type: "bill", - })), - ...creditPayments.map((item) => ({ - ...item, - type: "Credit Payment", - })), - ...reimbursements.map((item) => ({ - ...item, - type: "Reimbursement", - })), - ]; - console.log("Merged Data:", merged); - setOriginalPayments(merged); - setFilteredPayments(merged); - }; - - const applyFilters = () => { - console.log("Applying filters with:", filters); - - let filtered = [...originalPayments]; - - if (filters.kstId) { - filtered = filtered.filter( - (item) => item.creditor?.kst_id === filters.kstId, - ); - } - if (filters.ledgerId) { - filtered = filtered.filter( - (item) => item.creditor?.ledger_id === filters.ledgerId, - ); - } - if (filters.amount) { - const amountFilter = parseFloat(filters.amount); - filtered = filtered.filter( - (item) => - item.creditor?.amount && - parseFloat(item.creditor.amount) === amountFilter, - ); - } - - console.log("Filtered Payments After Filtering:", filtered); - setFilteredPayments(filtered); - }; - - const { bills, loadingBill, errorBill } = useFetchBills(); - const { creditPayments, loadingCreditPayments, errorCreditPayments } = - useFetchCreditPayments(); - const { reimbursements, loadingReimbursements, errorReimbursements } = - useFetchReimbursements(); - const { kstItems, loadingKst, errorKst } = useFetchKstItems(); - const { ledgerItems, loadingLedger, errorLedger } = useFetchLedgerItems(); - - const loading = loadingBill || loadingCreditPayments || loadingReimbursements; - const error = - errorBill || - errorCreditPayments || - errorReimbursements || - errorLedger || - errorKst; - console.log("Loading:", loading, "Error:", error); - - useEffect(() => { - console.log("Checking if all data is ready for merging..."); - if ( - bills.length > 0 && - creditPayments.length > 0 && - reimbursements.length > 0 - ) { - console.log("Merging data..."); - mergeData(); - console.log("Merging completed, applying filters..."); - applyFilters(); - } - }, [bills, creditPayments, reimbursements]); // Runs when any of these change. - - useEffect(() => { - console.log("Filters changed, applying new filters..."); - applyFilters(); - }, [filters]); // Runs whenever filters change. + creditPaymentsReadCreditPayments, + kstsReadKsts, + ledgersReadLedgers, + authGetBasicUserInfo, +} from "../client/services.gen"; +import { BasicUser, Kst, Ledger } from "../client/types.gen"; +import GenericDataTable from "../components/GenericDataTable"; +import { Button } from "@mui/material"; + +export async function addLoader() { + const kstList = await kstsReadKsts({}); + const kst = kstList.data?.items || []; + const ledgerList = await ledgersReadLedgers({}); + const ledger = ledgerList.data?.items || []; + const userRequest = await authGetBasicUserInfo(); + const user = userRequest.data; + return { kst, ledger, user }; +} - const handleSelectChange = (event: SelectChangeEvent) => { - const { name, value } = event.target; - setFilters({ - ...filters, - [name]: value, - }); +const CreditList: React.FC = () => { + const { kst, ledger, user } = useLoaderData() as { + kst: Kst[]; + ledger: Ledger[]; + user: BasicUser; }; - const handleTextFieldChange = ( - event: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>, - ) => { - const { name, value } = event.target; - setFilters({ + const columns = [ + { name: "name", label: "Name" }, + { name: "creditor__amount", label: "Amount" }, + { + name: "card", + label: "Card", + options: { + filterType: "dropdown", + filterOptions: ["Event", "President", "Quaestor"], + }, + }, + { name: "creditor__kst__kst_number", label: "KST Number" }, + { name: "creditor__kst__name_de", label: "KST Name" }, + { name: "creditor__ledger__namede", label: "Ledger Name" }, + { name: "creditor__currency", label: "Currency" }, + { name: "recipt", label: "Receipt" }, + { name: "creator", label: "Creator" }, + { name: "edit", label: "edit", options: { filter: false, sort: false } }, + ]; + + // Define the data fetching function for Credit Payments + const fetchCreditPayments = async ({ + search, + sort, + filters, + }: { + search: string; + sort: { column: string; direction: "asc" | "desc" } | null; + filters: Record<string, any>; + }) => { + const body: any = { + search: search || null, + sort: sort ? `${sort.column}:${sort.direction}` : null, ...filters, - [name]: value, - }); - }; - - const getLedgerName = (ledgerId: string) => { - const ledger = ledgerItems.find((item) => item.id === ledgerId); - return ledger ? ledger.namede : "-"; - }; - - const getKstName = (kstId: string) => { - const kst = kstItems.find((item) => item.id === kstId); - return kst ? kst.name_de : "-"; + }; + + console.log("Fetching Credit Payments with:", body); + + try { + const response = await creditPaymentsReadCreditPayments({ query: body }); + const results = response.data?.items || []; + + // Transform the fetched data to match the table's columns + const transformedData = results.map((item: any) => ({ + name: item.name, + creditor__amount: item.creditor?.amount, + card: item.card, + creditor__kst__kst_number: + kst.find((k) => k.id === item.creditor?.kst_id)?.kst_number || + "Unknown", + creditor__kst__name_de: + kst.find((k) => k.id === item.creditor?.kst_id)?.name_de || "Unknown", + creditor__ledger__namede: + ledger.find((l) => l.id === item.creditor?.ledger_id)?.namede || + "Unknown", + creditor__currency: item.creditor?.currency, + recipt: item.recipt, + creator: user.nethz, + edit: ( + <Button + variant="contained" + color="primary" + href={`/creditpayment/${item.id}`} + > + Edit + </Button> + ), + })); + + return transformedData; + } catch (error) { + console.error("Error fetching Credit Payments:", error); + return []; + } }; return ( - <Container> - <Typography variant="h4" component="h2" gutterBottom> - Credit List - </Typography> - <FormControl fullWidth margin="normal"> - <InputLabel id="kst-filter-label">KST</InputLabel> - <Select - labelId="kst-filter-label" - name="kstId" - value={filters.kstId} - onChange={handleSelectChange} - > - <MenuItem value=""> - <em>None</em> - </MenuItem> - {kstItems.map((kst) => ( - <MenuItem key={kst.id} value={kst.id}> - {kst.name_de} - </MenuItem> - ))} - </Select> - </FormControl> - <FormControl fullWidth margin="normal"> - <InputLabel id="ledger-filter-label">Ledger</InputLabel> - <Select - labelId="ledger-filter-label" - name="ledgerId" - value={filters.ledgerId} - onChange={handleSelectChange} - > - <MenuItem value=""> - <em>None</em> - </MenuItem> - {ledgerItems.map((ledger) => ( - <MenuItem key={ledger.id} value={ledger.id}> - {ledger.namede} - </MenuItem> - ))} - </Select> - </FormControl> - <TextField - label="Amount" - name="amount" - value={filters.amount} - onChange={handleTextFieldChange} - fullWidth - margin="normal" - /> - - {loading ? ( - <CircularProgress /> - ) : error ? ( - <Alert severity="error">{error}</Alert> - ) : ( - <TableContainer component={Paper}> - <Table> - <TableHead> - <TableRow> - <TableCell>Type</TableCell> - <TableCell>Ledger</TableCell> - <TableCell>KST</TableCell> - <TableCell>Amount</TableCell> - <TableCell>Accounting Year</TableCell> - <TableCell>Comment</TableCell> - <TableCell>QComment</TableCell> - <TableCell>Creator</TableCell> - <TableCell>Recipient</TableCell> - <TableCell>Card</TableCell> - </TableRow> - </TableHead> - <TableBody> - {filteredPayments.map((payment) => ( - <TableRow key={payment.id}> - <TableCell>{payment.type}</TableCell> {/* Display the type */} - <TableCell> - {getLedgerName(payment.creditor?.ledger_id || "-")} - </TableCell> - <TableCell> - {getKstName(payment.creditor?.kst_id || "-")} - </TableCell> - <TableCell>{payment.creditor?.amount || "-"}</TableCell> - <TableCell> - {payment.creditor?.accounting_year || "-"} - </TableCell> - <TableCell>{payment.creditor?.comment || "-"}</TableCell> - <TableCell>{payment.creditor?.qcomment || "-"}</TableCell> - <TableCell>{payment.creator || "-"}</TableCell> - <TableCell>{payment.recipient || "-"}</TableCell> - <TableCell>{payment.card || "-"}</TableCell>{" "} - {/* Only for creditPayments */} - </TableRow> - ))} - </TableBody> - </Table> - </TableContainer> - )} - </Container> + <GenericDataTable + title="Credit Payments List" + columns={columns} + fetchData={fetchCreditPayments} + /> ); -} +}; + +export default CreditList; diff --git a/src/pages/EditCreditPayment.tsx b/src/pages/EditCreditPayment.tsx new file mode 100644 index 0000000000000000000000000000000000000000..6ebef65e6d99e9a844e3a67d8fd94d29a4f98b27 --- /dev/null +++ b/src/pages/EditCreditPayment.tsx @@ -0,0 +1,145 @@ +import { useState, useEffect } from "react"; +import { Container, CircularProgress } from "@mui/material"; +import { + creditPaymentsCreateCreditPayment, + creditPaymentsReadCreditPayment, + creditPaymentsUpdateCreditPayment, +} from "../client/services.gen"; +import { + Card, + Kst, + Ledger, + BasicUser, + CreditPaymentPublic_Input, +} from "../client/types.gen"; + +import client from "../apiClientConfig"; // Do not remove + +import ObjectEditor, { + FieldConfig, + FieldType, +} from "../components/ObjectEditor"; +import { useLoaderData, useParams } from "react-router-dom"; +import { Kst_title, Ledger_title } from "../components/Titles"; +import { CreditPaymentPublic_InputSchema } from "../client"; + +function generateFieldConfigs( + kst: Kst[], + ledger: Ledger[], +): FieldConfig<CreditPaymentPublic_Input>[] { + return [ + { + name: "creditor.kst_id", + label: "kst", + type: FieldType.STRING, + items: kst.map((k) => ({ label: Kst_title(k), value: k.id ? k.id : "" })), + }, + { + name: "creditor.ledger_id", + label: "ledger", + type: FieldType.STRING, + items: ledger.map((l) => ({ + label: Ledger_title(l), + value: l.id ? l.id : "", + })), + }, + { name: "creditor.amount", label: "amount", type: FieldType.NUMERIC }, + { name: "creditor.currency", label: "währung", type: FieldType.STRING }, + { name: "creditor.comment", label: "kommentar", type: FieldType.STRING }, + { + name: "card", + label: "creditcard", + type: FieldType.STRING, + items: [ + { label: "President", value: Card.PRESIDENT }, + { label: "Events", value: Card.EVENTS }, + { label: "Quastor", value: Card.QUAESTOR }, + ], + }, + { name: "recipt", label: "recipt", type: FieldType.STRING }, + ]; +} + +export default function EditCreditPayment() { + const { idstring } = useParams<{ idstring: string }>(); // Get ID from URL params + const { kst, ledger, user } = useLoaderData() as { + kst: Kst[]; + ledger: Ledger[]; + user: BasicUser; + }; + console.log("idstring", idstring); + const [loading, setLoading] = useState<boolean>(true); + const [initialElement, setInitialElement] = + useState<CreditPaymentPublic_Input | null>(null); + + useEffect(() => { + const fetchData = async () => { + try { + // Fetch existing credit payment data by ID + console.log("Fetching credit payment data for ID:", idstring); + const database = await creditPaymentsReadCreditPayment({ + path: { CreditPayment_id: idstring }, + }); + const data = database.data; + setInitialElement({ + id: data?.id || "", + creditor_id: data?.creditor_id || "", + name: data?.name || "", + creditor: { + id: data?.creditor?.id || "", + kst_id: data?.creditor?.kst_id || "", + ledger_id: data?.creditor?.ledger_id || "", + amount: data?.creditor?.amount || 0, + accounting_year: data?.creditor?.accounting_year || 2024, + currency: data?.creditor?.currency || "CHF", + comment: data?.creditor?.comment || "", + qcomment: data?.creditor?.qcomment || "", + }, + recipt: data?.recipt || "", + card: data?.card || "President", + creator: user.amiv_id, + }); + } catch (error) { + console.error("Failed to load credit payment data:", error); + } finally { + setLoading(false); + } + }; + + fetchData(); + }, [idstring, user.amiv_id]); + + const submitter = async (changes: CreditPaymentPublic_Input) => { + const response = await creditPaymentsUpdateCreditPayment({ + body: changes, + path: { CreditPayment_id: idstring }, + }); + if (response.error) { + throw response.error; + } else { + // Optionally navigate or handle success + return; + } + }; + + const fieldConfig = generateFieldConfigs(kst, ledger); + + if (loading || !initialElement) { + return ( + <Container> + <CircularProgress /> + </Container> + ); + } + + return ( + <Container> + <ObjectEditor + fieldConfigs={fieldConfig} + header="Edit Credit Payment" + submitter={submitter} + initial={initialElement} + /> + </Container> + ); +} diff --git a/src/pages/Reimbursement.tsx b/src/pages/Reimbursement.tsx index b66de84720fc5aebd97c28ee747a97fbd187fa71..b613817d57c2796e4a9ab0b119d2c6da0a31c151 100644 --- a/src/pages/Reimbursement.tsx +++ b/src/pages/Reimbursement.tsx @@ -61,6 +61,7 @@ export default function GenerateReimbursement() { currency: "CHF", comment: "", qcomment: "", + name: "", }, recipt: "", creator: user.amiv_id, @@ -68,6 +69,7 @@ export default function GenerateReimbursement() { }; const submitter = async (changes: ReimbursementCreate) => { + changes.name = "name"; const response = await reimbursementsCreateReimbursement({ body: changes }); if (response.error) { throw response.error; diff --git a/yarn.lock b/yarn.lock index 55cd8d622bf4669be87bf96e09b75d9caea78c82..f2951034945159656e49de3462620c39e0a25b6f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -142,7 +142,15 @@ dependencies: "@babel/helper-plugin-utils" "^7.25.9" -"@babel/runtime@^7.12.5", "@babel/runtime@^7.18.3", "@babel/runtime@^7.25.7", "@babel/runtime@^7.26.0", "@babel/runtime@^7.5.5", "@babel/runtime@^7.8.7": +"@babel/runtime-corejs3@^7.12.1": + version "7.26.0" + resolved "https://registry.yarnpkg.com/@babel/runtime-corejs3/-/runtime-corejs3-7.26.0.tgz#5af6bed16073eb4a0191233d61e158a5c768c430" + integrity sha512-YXHu5lN8kJCb1LOb9PgV6pvak43X2h4HvRApcN5SdWeaItQOzfn1hgP6jasD6KWQyJDBxrVmA9o9OivlnNJK/w== + dependencies: + core-js-pure "^3.30.2" + regenerator-runtime "^0.14.0" + +"@babel/runtime@^7.12.5", "@babel/runtime@^7.18.3", "@babel/runtime@^7.25.7", "@babel/runtime@^7.26.0", "@babel/runtime@^7.5.5", "@babel/runtime@^7.7.2", "@babel/runtime@^7.8.7", "@babel/runtime@^7.9.2": version "7.26.0" resolved "https://registry.npmjs.org/@babel/runtime/-/runtime-7.26.0.tgz" integrity sha512-FDSOghenHTiToteC/QRlv2q3DhPZ/oOXTBoirfWNx1Cx3TMVcGWQtMMmQcSvb/JjpNeGzx8Pq/b4fKEJuWm1sw== @@ -196,6 +204,17 @@ source-map "^0.5.7" stylis "4.2.0" +"@emotion/cache@*", "@emotion/cache@^11.7.1": + version "11.14.0" + resolved "https://registry.yarnpkg.com/@emotion/cache/-/cache-11.14.0.tgz#ee44b26986eeb93c8be82bb92f1f7a9b21b2ed76" + integrity sha512-L/B1lc/TViYk4DcpGxtAVbx0ZyiKM5ktoIyafGkH6zg/tj+mA+NE//aPYKG0k8kCHSHVJrpLpcAlOBEXQ3SavA== + dependencies: + "@emotion/memoize" "^0.9.0" + "@emotion/sheet" "^1.4.0" + "@emotion/utils" "^1.4.2" + "@emotion/weak-memoize" "^0.4.0" + stylis "4.2.0" + "@emotion/cache@^11.13.0", "@emotion/cache@^11.13.1": version "11.13.1" resolved "https://registry.npmjs.org/@emotion/cache/-/cache-11.13.1.tgz" @@ -238,6 +257,17 @@ "@emotion/weak-memoize" "^0.4.0" hoist-non-react-statics "^3.3.1" +"@emotion/serialize@*": + version "1.3.3" + resolved "https://registry.yarnpkg.com/@emotion/serialize/-/serialize-1.3.3.tgz#d291531005f17d704d0463a032fe679f376509e8" + integrity sha512-EISGqt7sSNWHGI76hC7x1CksiXPahbxEOrC5RjmFRJTqLyEK9/9hZvBbiYn70dw4wuwMKiEMCUlR6ZXTSWQqxA== + dependencies: + "@emotion/hash" "^0.9.2" + "@emotion/memoize" "^0.9.0" + "@emotion/unitless" "^0.10.0" + "@emotion/utils" "^1.4.2" + csstype "^3.0.2" + "@emotion/serialize@^1.2.0", "@emotion/serialize@^1.3.0", "@emotion/serialize@^1.3.1", "@emotion/serialize@^1.3.2": version "1.3.2" resolved "https://registry.npmjs.org/@emotion/serialize/-/serialize-1.3.2.tgz" @@ -276,6 +306,11 @@ resolved "https://registry.npmjs.org/@emotion/use-insertion-effect-with-fallbacks/-/use-insertion-effect-with-fallbacks-1.1.0.tgz" integrity sha512-+wBOcIV5snwGgI2ya3u99D7/FJquOIniQT1IKyDsBmEgwvpxMNeS65Oib7OnE2d2aY+3BU4OiH+0Wchf8yk3Hw== +"@emotion/utils@*", "@emotion/utils@^1.4.2": + version "1.4.2" + resolved "https://registry.yarnpkg.com/@emotion/utils/-/utils-1.4.2.tgz#6df6c45881fcb1c412d6688a311a98b7f59c1b52" + integrity sha512-3vLclRofFziIa3J2wDh9jjbkUz9qk5Vi3IZ/FSTKViB0k+ef0fPV7dYrUIugbgupYDx7v9ud/SjrtEP8Y4xLoA== + "@emotion/utils@^1.4.0", "@emotion/utils@^1.4.1": version "1.4.1" resolved "https://registry.npmjs.org/@emotion/utils/-/utils-1.4.1.tgz" @@ -713,6 +748,21 @@ resolved "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz" integrity sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A== +"@react-dnd/asap@^4.0.0": + version "4.0.1" + resolved "https://registry.yarnpkg.com/@react-dnd/asap/-/asap-4.0.1.tgz#5291850a6b58ce6f2da25352a64f1b0674871aab" + integrity sha512-kLy0PJDDwvwwTXxqTFNAAllPHD73AycE9ypWeln/IguoGBEbvFcPDbCV03G52bEcC5E+YgupBE0VzHGdC8SIXg== + +"@react-dnd/invariant@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@react-dnd/invariant/-/invariant-2.0.0.tgz#09d2e81cd39e0e767d7da62df9325860f24e517e" + integrity sha512-xL4RCQBCBDJ+GRwKTFhGUW8GXa4yoDfJrPbLblc3U09ciS+9ZJXJ3Qrcs/x2IODOdIE5kQxvMmE2UKyqUictUw== + +"@react-dnd/shallowequal@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@react-dnd/shallowequal/-/shallowequal-2.0.0.tgz#a3031eb54129f2c66b2753f8404266ec7bf67f0a" + integrity sha512-Pc/AFTdwZwEKJxFJvlxrSmGe/di+aAOBn60sremrpLo6VI/6cmiUYNNwlI5KNYttg7uypzA3ILPMPgxB2GYZEg== + "@remix-run/router@1.20.0": version "1.20.0" resolved "https://registry.npmjs.org/@remix-run/router/-/router-1.20.0.tgz" @@ -858,6 +908,14 @@ resolved "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz" integrity sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw== +"@types/hoist-non-react-statics@^3.3.1": + version "3.3.6" + resolved "https://registry.yarnpkg.com/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.6.tgz#6bba74383cdab98e8db4e20ce5b4a6b98caed010" + integrity sha512-lPByRJUer/iN/xa4qpyL0qmL11DqNW81iU/IG1S3uvRUq4oKagz8VCxZjiWkumgt66YT3vOdDgZ0o32sGKtCEw== + dependencies: + "@types/react" "*" + hoist-non-react-statics "^3.3.0" + "@types/json-schema@^7.0.15": version "7.0.15" resolved "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz" @@ -1118,6 +1176,11 @@ citty@^0.1.6: dependencies: consola "^3.2.3" +clsx@^1.0.4, clsx@^1.1.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/clsx/-/clsx-1.2.1.tgz#0ddc4a20a549b59c93a4116bb26f5294ca17dc12" + integrity sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg== + clsx@^2.1.1: version "2.1.1" resolved "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz" @@ -1165,6 +1228,11 @@ convert-source-map@^2.0.0: resolved "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz" integrity sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg== +core-js-pure@^3.30.2: + version "3.39.0" + resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.39.0.tgz#aa0d54d70a15bdc13e7c853db87c10abc30d68f3" + integrity sha512-7fEcWwKI4rJinnK+wLTezeg2smbFFdSBP6E2kQZNbnzM2s1rpKQ6aaRteZSSg7FLU3P0HGGVo/gbpfanU36urg== + cosmiconfig@^7.0.0: version "7.1.0" resolved "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.1.0.tgz" @@ -1217,7 +1285,16 @@ destr@^2.0.3: resolved "https://registry.npmjs.org/destr/-/destr-2.0.3.tgz" integrity sha512-2N3BOUU4gYMpTP24s5rF5iP7BDr7uNTCs4ozw3kf/eKfvWSIu93GEBi5m427YoyJoeOzQ5smuu4nNAPGb8idSQ== -dom-helpers@^5.0.1: +dnd-core@^11.1.3: + version "11.1.3" + resolved "https://registry.yarnpkg.com/dnd-core/-/dnd-core-11.1.3.tgz#f92099ba7245e49729d2433157031a6267afcc98" + integrity sha512-QugF55dNW+h+vzxVJ/LSJeTeUw9MCJ2cllhmVThVPEtF16ooBkxj0WBE5RB+AceFxMFo1rO6bJKXtqKl+JNnyA== + dependencies: + "@react-dnd/asap" "^4.0.0" + "@react-dnd/invariant" "^2.0.0" + redux "^4.0.4" + +dom-helpers@^5.0.1, dom-helpers@^5.1.3: version "5.2.1" resolved "https://registry.npmjs.org/dom-helpers/-/dom-helpers-5.2.1.tgz" integrity sha512-nRCa7CK3VTrM2NmGkIy4cbK7IZlgBE/PYMn55rrXefr5xXDP0LdtfPnblFDoVdcAfslJ7or6iqAUnx0CCGIWQA== @@ -1579,7 +1656,7 @@ hasown@^2.0.2: dependencies: function-bind "^1.1.2" -hoist-non-react-statics@^3.3.1: +hoist-non-react-statics@^3.1.0, hoist-non-react-statics@^3.3.0, hoist-non-react-statics@^3.3.1: version "3.3.2" resolved "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz" integrity sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw== @@ -1722,11 +1799,56 @@ locate-path@^6.0.0: dependencies: p-locate "^5.0.0" +lodash.assignwith@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/lodash.assignwith/-/lodash.assignwith-4.2.0.tgz#127a97f02adc41751a954d24b0de17e100e038eb" + integrity sha512-ZznplvbvtjK2gMvnQ1BR/zqPFZmS6jbK4p+6Up4xcRYA7yMIwxHCfbTcrYxXKzzqLsQ05eJPVznEW3tuwV7k1g== + +lodash.clonedeep@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef" + integrity sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ== + +lodash.debounce@^4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" + integrity sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow== + +lodash.find@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/lodash.find/-/lodash.find-4.6.0.tgz#cb0704d47ab71789ffa0de8b97dd926fb88b13b1" + integrity sha512-yaRZoAV3Xq28F1iafWN1+a0rflOej93l1DQUejs3SZ41h2O9UJBoS9aueGjPDgAl4B6tPC0NuuchLKaDQQ3Isg== + +lodash.get@^4.4.2: + version "4.4.2" + resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99" + integrity sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ== + +lodash.isequal@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz#415c4478f2bcc30120c22ce10ed3226f7d3e18e0" + integrity sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ== + +lodash.isundefined@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/lodash.isundefined/-/lodash.isundefined-3.0.1.tgz#23ef3d9535565203a66cefd5b830f848911afb48" + integrity sha512-MXB1is3s899/cD8jheYYE2V9qTHwKvt+npCwpD+1Sxm3Q3cECXCiYHjeHWXNwr6Q0SOBPrYUDxendrO6goVTEA== + +lodash.memoize@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" + integrity sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag== + lodash.merge@^4.6.2: version "4.6.2" resolved "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz" integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== +lodash.throttle@^4.0.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/lodash.throttle/-/lodash.throttle-4.1.1.tgz#c23e91b710242ac70c37f1e1cda9274cc39bf2f4" + integrity sha512-wIkUCfVKpVsWo3JSZlc+8MB5it+2AN5W8J7YVMST30UrvcQNZ1Okbj+rbVniijTWE6FGYy4XJq/rHkas8qJMLQ== + loose-envify@^1.1.0, loose-envify@^1.4.0: version "1.4.0" resolved "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz" @@ -1837,6 +1959,30 @@ ms@^2.1.3: resolved "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== +mui-datatables@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/mui-datatables/-/mui-datatables-4.3.0.tgz#445d6da0960005e242d4f69693702a33daba05ae" + integrity sha512-LFliQwNnnxW03IO+V3q/ORxZsOHkzl53iGogLbjUJzme47hNEN106dM0ie8oMSc0heYJY0J07oZmKm7Xn3X7IQ== + dependencies: + "@babel/runtime-corejs3" "^7.12.1" + "@emotion/cache" "^11.7.1" + clsx "^1.1.1" + lodash.assignwith "^4.2.0" + lodash.clonedeep "^4.5.0" + lodash.debounce "^4.0.8" + lodash.find "^4.6.0" + lodash.get "^4.4.2" + lodash.isequal "^4.5.0" + lodash.isundefined "^3.0.1" + lodash.memoize "^4.1.2" + lodash.merge "^4.6.2" + prop-types "^15.7.2" + react-dnd "^11.1.3" + react-dnd-html5-backend "^11.1.3" + react-sortable-tree-patch-react-17 "^2.9.0" + react-to-print "^2.8.0" + tss-react "^3.6.0" + mui@^0.0.1: version "0.0.1" resolved "https://registry.npmjs.org/mui/-/mui-0.0.1.tgz" @@ -1993,6 +2139,11 @@ perfect-debounce@^1.0.0: resolved "https://registry.npmjs.org/perfect-debounce/-/perfect-debounce-1.0.0.tgz" integrity sha512-xCy9V055GLEqoFaHoC1SoLIaLmWctgCUaBaWxDZ7/Zx4CTyX7cJQLJOok/orfjZAh9kEYpjJa4d0KcJmCbctZA== +performance-now@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" + integrity sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow== + picocolors@^1.0.0, picocolors@^1.1.0: version "1.1.1" resolved "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz" @@ -2031,7 +2182,7 @@ prettier@^3.3.3: resolved "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz" integrity sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew== -prop-types@^15.6.2, prop-types@^15.8.1: +prop-types@^15.5.9, prop-types@^15.6.1, prop-types@^15.6.2, prop-types@^15.7.2, prop-types@^15.8.1: version "15.8.1" resolved "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz" integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg== @@ -2050,6 +2201,13 @@ queue-microtask@^1.2.2: resolved "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz" integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== +raf@^3.2.0: + version "3.4.1" + resolved "https://registry.yarnpkg.com/raf/-/raf-3.4.1.tgz#0742e99a4a6552f445d73e3ee0328af0ff1ede39" + integrity sha512-Sq4CW4QhwOHE8ucn6J34MqtZCeWFP2aQSmrlroYgqAV1PjStIhJXxYuTgUIfkEk7zTLjmIjLmU5q+fbD1NnOJA== + dependencies: + performance-now "^2.1.0" + rc9@^2.1.2: version "2.1.2" resolved "https://registry.npmjs.org/rc9/-/rc9-2.1.2.tgz" @@ -2058,6 +2216,48 @@ rc9@^2.1.2: defu "^6.1.4" destr "^2.0.3" +react-display-name@^0.2.0: + version "0.2.5" + resolved "https://registry.yarnpkg.com/react-display-name/-/react-display-name-0.2.5.tgz#304c7cbfb59ee40389d436e1a822c17fe27936c6" + integrity sha512-I+vcaK9t4+kypiSgaiVWAipqHRXYmZIuAiS8vzFvXHHXVigg/sMKwlRgLy6LH2i3rmP+0Vzfl5lFsFRwF1r3pg== + +react-dnd-html5-backend@^11.1.3: + version "11.1.3" + resolved "https://registry.yarnpkg.com/react-dnd-html5-backend/-/react-dnd-html5-backend-11.1.3.tgz#2749f04f416ec230ea193f5c1fbea2de7dffb8f7" + integrity sha512-/1FjNlJbW/ivkUxlxQd7o3trA5DE33QiRZgxent3zKme8DwF4Nbw3OFVhTRFGaYhHFNL1rZt6Rdj1D78BjnNLw== + dependencies: + dnd-core "^11.1.3" + +react-dnd-scrollzone-patch-react-17@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/react-dnd-scrollzone-patch-react-17/-/react-dnd-scrollzone-patch-react-17-1.0.2.tgz#aa7e4c54268fe109246e790f1412427481b63067" + integrity sha512-Wfhyc/Y/Veim29REBYm8nMmtDB5IwSmPPhXIuabBgsEa1MrVsuOwK9+7LmuP+mGbDOEP/S6G8+5XvDqPlRFK2g== + dependencies: + hoist-non-react-statics "^3.1.0" + lodash.throttle "^4.0.1" + prop-types "^15.5.9" + raf "^3.2.0" + react-display-name "^0.2.0" + +react-dnd@^11.1.3: + version "11.1.3" + resolved "https://registry.yarnpkg.com/react-dnd/-/react-dnd-11.1.3.tgz#f9844f5699ccc55dfc81462c2c19f726e670c1af" + integrity sha512-8rtzzT8iwHgdSC89VktwhqdKKtfXaAyC4wiqp0SywpHG12TTLvfOoL6xNEIUWXwIEWu+CFfDn4GZJyynCEuHIQ== + dependencies: + "@react-dnd/shallowequal" "^2.0.0" + "@types/hoist-non-react-statics" "^3.3.1" + dnd-core "^11.1.3" + hoist-non-react-statics "^3.3.0" + +react-dom@^17.0.0: + version "17.0.2" + resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-17.0.2.tgz#ecffb6845e3ad8dbfcdc498f0d0a939736502c23" + integrity sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA== + dependencies: + loose-envify "^1.1.0" + object-assign "^4.1.1" + scheduler "^0.20.2" + react-dom@^18.3.1: version "18.3.1" resolved "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz" @@ -2076,6 +2276,11 @@ react-is@^18.3.1: resolved "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz" integrity sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg== +react-lifecycles-compat@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz#4f1a273afdfc8f3488a8c516bfda78f872352362" + integrity sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA== + react-refresh@^0.14.2: version "0.14.2" resolved "https://registry.npmjs.org/react-refresh/-/react-refresh-0.14.2.tgz" @@ -2096,6 +2301,26 @@ react-router@6.27.0: dependencies: "@remix-run/router" "1.20.0" +react-sortable-tree-patch-react-17@^2.9.0: + version "2.9.0" + resolved "https://registry.yarnpkg.com/react-sortable-tree-patch-react-17/-/react-sortable-tree-patch-react-17-2.9.0.tgz#d80ef61a5b941a8cc52570f6aa2c3059076d9f21" + integrity sha512-Ngtdbf78OfjqCxLj7+N+K4zM9d1mQ/tfnUsOfICFDzNa5JHg6AjixAj69ijvz0ykEiA9lYop+0Fm4KCOqCdlKA== + dependencies: + lodash.isequal "^4.5.0" + prop-types "^15.6.1" + react "^17.0.0" + react-dnd "^11.1.3" + react-dnd-html5-backend "^11.1.3" + react-dnd-scrollzone-patch-react-17 "^1.0.2" + react-dom "^17.0.0" + react-lifecycles-compat "^3.0.4" + react-virtualized "^9.21.2" + +react-to-print@^2.8.0: + version "2.15.1" + resolved "https://registry.yarnpkg.com/react-to-print/-/react-to-print-2.15.1.tgz#c9a6732cadf1118fc90d886b54a9388c419561b9" + integrity sha512-1foogIFbCpzAVxydkhBiDfMiFYhIMphiagDOfcG4X/EcQ+fBPqJ0rby9Wv/emzY1YLkIQy/rEgOrWQT+rBKhjw== + react-transition-group@^4.4.5: version "4.4.5" resolved "https://registry.npmjs.org/react-transition-group/-/react-transition-group-4.4.5.tgz" @@ -2106,6 +2331,26 @@ react-transition-group@^4.4.5: loose-envify "^1.4.0" prop-types "^15.6.2" +react-virtualized@^9.21.2: + version "9.22.5" + resolved "https://registry.yarnpkg.com/react-virtualized/-/react-virtualized-9.22.5.tgz#bfb96fed519de378b50d8c0064b92994b3b91620" + integrity sha512-YqQMRzlVANBv1L/7r63OHa2b0ZsAaDp1UhVNEdUaXI8A5u6hTpA5NYtUueLH2rFuY/27mTGIBl7ZhqFKzw18YQ== + dependencies: + "@babel/runtime" "^7.7.2" + clsx "^1.0.4" + dom-helpers "^5.1.3" + loose-envify "^1.4.0" + prop-types "^15.7.2" + react-lifecycles-compat "^3.0.4" + +react@^17.0.0: + version "17.0.2" + resolved "https://registry.yarnpkg.com/react/-/react-17.0.2.tgz#d0b5cc516d29eb3eee383f75b62864cfb6800037" + integrity sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA== + dependencies: + loose-envify "^1.1.0" + object-assign "^4.1.1" + react@^18.3.1: version "18.3.1" resolved "https://registry.npmjs.org/react/-/react-18.3.1.tgz" @@ -2118,6 +2363,13 @@ readdirp@^4.0.1: resolved "https://registry.npmjs.org/readdirp/-/readdirp-4.0.2.tgz" integrity sha512-yDMz9g+VaZkqBYS/ozoBJwaBhTbZo3UNYQHNRw1D3UFQB8oHB4uS/tAODO+ZLjGWmUbKnIlOWO+aaIiAxrUWHA== +redux@^4.0.4: + version "4.2.1" + resolved "https://registry.yarnpkg.com/redux/-/redux-4.2.1.tgz#c08f4306826c49b5e9dc901dee0452ea8fce6197" + integrity sha512-LAUYz4lc+Do8/g7aeRa8JkyDErK6ekstQaqWQrNRW//MY1TvCEpMtpTWvlQ+FPbWCx+Xixu/6SHt5N0HR+SB4w== + dependencies: + "@babel/runtime" "^7.9.2" + regenerator-runtime@^0.14.0: version "0.14.1" resolved "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz" @@ -2176,6 +2428,14 @@ run-parallel@^1.1.9: dependencies: queue-microtask "^1.2.2" +scheduler@^0.20.2: + version "0.20.2" + resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.20.2.tgz#4baee39436e34aa93b4874bddcbf0fe8b8b50e91" + integrity sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ== + dependencies: + loose-envify "^1.1.0" + object-assign "^4.1.1" + scheduler@^0.23.2: version "0.23.2" resolved "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz" @@ -2291,6 +2551,15 @@ ts-api-utils@^1.3.0: resolved "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.4.0.tgz" integrity sha512-032cPxaEKwM+GT3vA5JXNzIaizx388rhsSW79vGRNGXfRRAdEAn2mvk36PvK5HnOchyWZ7afLEXqYCvPCrzuzQ== +tss-react@^3.6.0: + version "3.7.1" + resolved "https://registry.yarnpkg.com/tss-react/-/tss-react-3.7.1.tgz#119647731490f9e7e62c7f6a38a78df981929a4b" + integrity sha512-dfWUoxBlKZfIG9UC1A2h02OmcE/Ni0itCmmZu94E9g+KyBhKMHKcsKvUm0bNlRqTmYjXiCgPJDmj5fyc8CSrLg== + dependencies: + "@emotion/cache" "*" + "@emotion/serialize" "*" + "@emotion/utils" "*" + type-check@^0.4.0, type-check@~0.4.0: version "0.4.0" resolved "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz"