Add loading context and loading bar component; integrate axios for API calls and update routing for locker registration

This commit is contained in:
2024-12-22 15:59:24 +05:30
parent bfe22a61a5
commit a6a67d69d5
14 changed files with 487 additions and 40 deletions

View File

@@ -0,0 +1,14 @@
import api from './api';
export const lockersService = {
registerLockers: async (cabinetId, lockers) => {
return api.post('/cabinet', {
cabinetId,
lockers: lockers.map(({ id, size, keyId }) => ({
id,
size,
keyId
}))
});
},
};