mirror of
https://github.com/sysadminsmedia/homebox.git
synced 2026-01-01 02:27:32 +01:00
- Replaced BaseModal and BaseButton with AlertDialog components from ui library - Added proper imports for AlertDialog, AlertDialogContent, AlertDialogHeader, etc. - Fixed prettier formatting issues (auto-fixed by eslint --fix) - Fixed Tailwind CSS shorthand (h-4 w-4 -> size-4) - Added addAlert/removeAlert for dialog provider integration - All linting and type-checking errors resolved Co-authored-by: katosdev <7927609+katosdev@users.noreply.github.com>
45 lines
1.2 KiB
TypeScript
45 lines
1.2 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; wipeMaintenance?: boolean }) {
|
|
return this.http.post<
|
|
{ wipeLabels?: boolean; wipeLocations?: boolean; wipeMaintenance?: boolean },
|
|
ActionAmountResult
|
|
>({
|
|
url: route("/actions/wipe-inventory"),
|
|
body: options || {},
|
|
});
|
|
}
|
|
}
|