mirror of
https://github.com/sysadminsmedia/homebox.git
synced 2025-12-30 17:47:24 +01:00
- Added WipeInventoryDialog component with checkboxes for wiping labels and locations - Modified backend WipeInventory method to accept wipeLabels and wipeLocations parameters - Added owner check in HandleWipeInventory to restrict action to group owners only - Updated frontend API client to send wipe options - Added new translation keys for checkbox labels and owner note - Integrated dialog into app layout and updated tools.vue to use new dialog Co-authored-by: katosdev <7927609+katosdev@users.noreply.github.com>
42 lines
1.1 KiB
TypeScript
42 lines
1.1 KiB
TypeScript
import { BaseAPI, route } from "../base";
|
|
import type { ActionAmountResult } from "../types/data-contracts";
|
|
|
|
export class ActionsAPI extends BaseAPI {
|
|
ensureAssetIDs() {
|
|
return this.http.post<void, ActionAmountResult>({
|
|
url: route("/actions/ensure-asset-ids"),
|
|
});
|
|
}
|
|
|
|
resetItemDateTimes() {
|
|
return this.http.post<void, ActionAmountResult>({
|
|
url: route("/actions/zero-item-time-fields"),
|
|
});
|
|
}
|
|
|
|
ensureImportRefs() {
|
|
return this.http.post<void, ActionAmountResult>({
|
|
url: route("/actions/ensure-import-refs"),
|
|
});
|
|
}
|
|
|
|
setPrimaryPhotos() {
|
|
return this.http.post<void, ActionAmountResult>({
|
|
url: route("/actions/set-primary-photos"),
|
|
});
|
|
}
|
|
|
|
createMissingThumbnails() {
|
|
return this.http.post<void, ActionAmountResult>({
|
|
url: route("/actions/create-missing-thumbnails"),
|
|
});
|
|
}
|
|
|
|
wipeInventory(options?: { wipeLabels?: boolean; wipeLocations?: boolean }) {
|
|
return this.http.post<{ wipeLabels?: boolean; wipeLocations?: boolean }, ActionAmountResult>({
|
|
url: route("/actions/wipe-inventory"),
|
|
body: options || {},
|
|
});
|
|
}
|
|
}
|