Compare commits

...

4 Commits

Author SHA1 Message Date
vamsi.balaga
5b55bd267b fix: build files into static/ so /assets reloads
The /assets route shared its URL with Vite's assets/ build folder, so
nginx found a real folder with no index.html and answered 403 on reload
or a direct link.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 18:59:28 +05:30
vamsi.balaga
0d2e7585b8 Revert "fix: allow Edit only on Available assets"
This reverts commit 72cdae3.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 18:57:57 +05:30
vamsi.balaga
72cdae3d1c fix: allow Edit only on Available assets
The builder only allows the Asset details activity in Available, so the
runtime rejected Edit in Assigned and Under Repair. Disable the button
outside Available with a hint to return the asset first, and keep the
closed-asset notice keyed to the open states.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 18:53:44 +05:30
vamsi.balaga
96718d173c fix: leave Assigned by out of the Assign form
field_5 is a select in the builder and the runtime rejects any value not
in its options, so sending employee names failed with "Assigned by must be
one of the listed options". Drop it from the form, as Reassign already does
for field_11, until the builder field is changed to text.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 18:37:07 +05:30
2 changed files with 7 additions and 3 deletions

View File

@ -229,9 +229,10 @@ export const ASSET_ASSIGN_ACTIVITY_ID = 'd18815a4-4e74-480d-a943-67dce894412f'
/** Fields the user fills in. */
export const ASSET_ASSIGN_FIELDS = [
{ id: 'field_1', label: 'Assigned date', type: 'date' },
// The builder has no options for Assigned by, so the form offers the active
// employees' names (`employeeOptions`, filled in by the dialog).
{ id: 'field_5', label: 'Assigned by', type: 'select', options: [], employeeOptions: true },
// Assigned by (field_5) is left out of the form on purpose: it is a select in
// the builder and the runtime rejects any value not in its options ("Assigned
// by must be one of the listed options"), so employee names can't go there.
// Add it back, with `employeeOptions: true`, once the builder field is text.
{ id: 'field_6', label: 'Remarks', type: 'longtext' },
{
id: 'field_21',

View File

@ -4,6 +4,9 @@ import react from "@vitejs/plugin-react";
export default defineConfig(({ command }) => ({
// Relative base: frontgen places one artifact at any mount path and injects <base href>.
base: "./",
// Not "assets": the app has an /assets route, and nginx answers 403 for a real
// folder with no index.html, so reloading /asset-management/assets/ broke.
build: { assetsDir: "static" },
plugins: [react()],
server: {
port: 5173,