Add locker service methods for status change and key swap; create LockerMaintenance and LockerStatus components with form validation and translations
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import api from './api';
|
||||
|
||||
export const lockersService = {
|
||||
export const lockerService = {
|
||||
registerLockers: async (cabinetId, lockers) => {
|
||||
return api.post('/cabinet', {
|
||||
cabinetId,
|
||||
@@ -11,4 +11,12 @@ export const lockersService = {
|
||||
}))
|
||||
});
|
||||
},
|
||||
|
||||
changeLockerStatus: async (cabinetId, lockerId, status) => {
|
||||
return api.patch(`/locker/status`, { cabinetId, lockerId, status });
|
||||
},
|
||||
|
||||
keySwap: async (cabinetId, lockerId, reason, oldKey, newKey) => {
|
||||
return api.patch(`/locker/key`, { cabinetId, lockerId, reason, oldKey, newKey });
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user