Repository navigation
feat(setup): scheduling base on local installs and a clear upload error without Cloudinary - #4
Merged
Merged
Conversation
- requireStorage answers 503 STORAGE_NOT_CONFIGURED before the six upload
routes that store on Cloudinary (avatar, maintenance, checklist,
blacklist, backoffice invoice PDF and assets); F&B is left out, it only
reads its PDF.
- errorCodeMessage picks the text from messages/{es,en}/errors.json by the
page language; apiClient uses it.
- Tests with a real Express server and multipart upload, and for both
languages.
- TODO: the rest of the error codes are translated but unused.
Why: on a local install without Cloudinary an upload failed with a 500 and
a technical English message; the user now gets a clear one in es or en.
- db-mysql/scheduling-seed.sql: the demo's fictitious scheduling base (10 employees as users with an unknown random password, contracts, rules, shifts, configuration and Oct-Dec 2026 solved). References to other users point to the local admin; rows of people no longer in the grid are left out. - setup:local loads it as step 4/5, before mock-data.sql. - pnpm seed:scheduling:export rebuilds the file from the saved demo base (read-only SELECTs). - SNAPSHOT_TABLES moves to services/demo/snapshot-tables.ts so scripts can import it without opening the app's pool. - Test: the seed only carries example.com users and every grid row and assignment belongs to an employee it creates. Why: a local install had no employees, so scheduling could not be tried; now it starts from the same base as the public demo.
- Step 3 says what setup:local loads in fewer words. - Step 5 runs in two terminals: dev:local keeps the first one busy. - Without Cloudinary an upload now explains itself instead of failing. Why: the steps read as one terminal, and the Cloudinary note predated the new message.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cambios
STORAGE_NOT_CONFIGUREDantes de las 6 rutas que suben a Cloudinary, con mensaje traducido en es/en.pnpm setup:localcarga la base de horarios ficticia de la demo (scheduling-seed.sql);pnpm seed:scheduling:exportla regenera.Por qué
Una instalación local no tenía empleados para probar horarios y una subida sin Cloudinary fallaba con un 500 técnico.
Probado en preview: demo, bloqueos de subida de la demo, subida como admin y reinicio de la demo.