Add Kundennummer/Nummernkreise settings and settings dialog.
Add number & setting API endpoints, StorageManager caches, and a Settings dialog (tabs for settings keys and number ranges) reachable from the user menu. Show Kundennummer and creation date in the Kunde list, and refactor Neuer Kunde to show an auto-generated number with group select.
This commit is contained in:
@@ -772,6 +772,11 @@ export const entity = {
|
||||
return http(`/api/entity/${id}`, { method: 'DELETE' });
|
||||
},
|
||||
|
||||
/** GET /api/entity/next-number → { number: string } */
|
||||
nextNumber() {
|
||||
return http('/api/entity/next-number');
|
||||
},
|
||||
|
||||
/** GET /api/entity/:entityId/address → { addresses: EntityAddress[] } */
|
||||
listAddresses(entityId) {
|
||||
return http(`/api/entity/${entityId}/address`);
|
||||
@@ -936,6 +941,25 @@ export const posterminal = {
|
||||
},
|
||||
};
|
||||
|
||||
export const number = {
|
||||
/**
|
||||
* GET /api/number → { numbers: [{ id, type, prefix, padding, next }] }
|
||||
* Lists the number sequences for the selected company.
|
||||
*/
|
||||
list() {
|
||||
return http('/api/number');
|
||||
},
|
||||
|
||||
/**
|
||||
* PATCH /api/number/:id
|
||||
* Body: at least one of { prefix, padding, next } — only present keys are patched.
|
||||
* → 200 { number: { id, type, prefix, padding, next } }
|
||||
*/
|
||||
update(id, body) {
|
||||
return http(`/api/number/${id}`, { method: 'PATCH', body });
|
||||
},
|
||||
};
|
||||
|
||||
export const auth = {
|
||||
async me() {
|
||||
try {
|
||||
@@ -997,6 +1021,7 @@ export default {
|
||||
customergroup,
|
||||
delivery,
|
||||
entity,
|
||||
number,
|
||||
order,
|
||||
posterminal,
|
||||
quote,
|
||||
|
||||
Reference in New Issue
Block a user