From 0444e88178f66cc10490731482fe80aa69b033da Mon Sep 17 00:00:00 2001 From: Vadym Samoilenko Date: Wed, 29 Apr 2026 15:43:50 +0100 Subject: [PATCH] feat: make client and project required when creating a job - Both fields now show a validation error on submit if not selected - Labels updated to show required asterisk - Section always visible regardless of client list length Co-Authored-By: Claude Sonnet 4.6 --- frontend/src/routes/jobs/NewJob.tsx | 66 ++++++++++++++++++----------- 1 file changed, 41 insertions(+), 25 deletions(-) diff --git a/frontend/src/routes/jobs/NewJob.tsx b/frontend/src/routes/jobs/NewJob.tsx index 9ce0462..53d86ce 100644 --- a/frontend/src/routes/jobs/NewJob.tsx +++ b/frontend/src/routes/jobs/NewJob.tsx @@ -126,6 +126,15 @@ export function NewJob() { return; } + if (!selectedClientId) { + toast.toastOnly.error('Please select a client'); + return; + } + if (!selectedProjectId) { + toast.toastOnly.error('Please select a project'); + return; + } + const jobData: JobCreateRequest = { title: data.title, requested_outputs: { @@ -208,6 +217,15 @@ export function NewJob() { return; } + if (!selectedClientId) { + toast.toastOnly.error('Please select a client'); + return; + } + if (!selectedProjectId) { + toast.toastOnly.error('Please select a project'); + return; + } + await multiUpload.startUpload({ requestedOutputs: { captions_vtt: data.captions_vtt, @@ -699,40 +717,38 @@ export function NewJob() { )} {/* Project */} - {clients.length > 0 && ( -
+
+
+ + +
+ {selectedClientId && (
- {selectedClientId && ( -
- - -
- )} -
- )} + )} +
{/* Brand Context */}