Introduce initial version of the Lonc app with core features, styling, and configurations.
- Add base app structure, including Bootstrap setup and Alpine.js integration. - Implement authentication flow with session handling. - Integrate stock management and label creation functionalities. - Include responsive styling and theme using CSS variables and custom components. - Add API clients for Tryton-based backend. - Set up kitchen and dashboard navigation workflows. - Configure service worker for PWA support.
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
export function fieldError(errors, field) {
|
||||
return errors[field] || '';
|
||||
}
|
||||
|
||||
export function normalizeValidationError(error) {
|
||||
if (error?.details && typeof error.details === 'object') {
|
||||
return error.details;
|
||||
}
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
export function debounce(callback, wait = 300) {
|
||||
let timeoutId;
|
||||
|
||||
return (...args) => {
|
||||
window.clearTimeout(timeoutId);
|
||||
timeoutId = window.setTimeout(() => callback(...args), wait);
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user