feat(back-end): new stock db and back-office improvements
This commit is contained in:
@@ -11,6 +11,7 @@ export interface AdminFilamentStockRow {
|
||||
stockSpools: number;
|
||||
spoolNetKg: number;
|
||||
stockKg: number;
|
||||
stockFilamentGrams: number;
|
||||
active: boolean;
|
||||
}
|
||||
|
||||
@@ -31,12 +32,16 @@ export interface AdminFilamentVariant {
|
||||
materialTechnicalTypeLabel?: string;
|
||||
variantDisplayName: string;
|
||||
colorName: string;
|
||||
colorHex?: string;
|
||||
finishType?: string;
|
||||
brand?: string;
|
||||
isMatte: boolean;
|
||||
isSpecial: boolean;
|
||||
costChfPerKg: number;
|
||||
stockSpools: number;
|
||||
spoolNetKg: number;
|
||||
stockKg: number;
|
||||
stockFilamentGrams: number;
|
||||
isActive: boolean;
|
||||
createdAt: string;
|
||||
}
|
||||
@@ -52,6 +57,9 @@ export interface AdminUpsertFilamentVariantPayload {
|
||||
materialTypeId: number;
|
||||
variantDisplayName: string;
|
||||
colorName: string;
|
||||
colorHex?: string;
|
||||
finishType?: string;
|
||||
brand?: string;
|
||||
isMatte: boolean;
|
||||
isSpecial: boolean;
|
||||
costChfPerKg: number;
|
||||
@@ -167,6 +175,10 @@ export class AdminOperationsService {
|
||||
return this.http.put<AdminFilamentVariant>(`${this.baseUrl}/filaments/variants/${variantId}`, payload, { withCredentials: true });
|
||||
}
|
||||
|
||||
deleteFilamentVariant(variantId: number): Observable<void> {
|
||||
return this.http.delete<void>(`${this.baseUrl}/filaments/variants/${variantId}`, { withCredentials: true });
|
||||
}
|
||||
|
||||
getContactRequests(): Observable<AdminContactRequest[]> {
|
||||
return this.http.get<AdminContactRequest[]>(`${this.baseUrl}/contact-requests`, { withCredentials: true });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user