refactor: make webhook URL optional in validation and comment out unused status selection fields
This commit is contained in:
parent
682c390220
commit
3f0963d3e8
@ -166,14 +166,14 @@ export const NewDepartmentModal = ({
|
||||
/>
|
||||
</div>
|
||||
|
||||
<FormSelect
|
||||
{/* <FormSelect
|
||||
label="Status"
|
||||
required
|
||||
options={statusOptions}
|
||||
value={String(statusValue)}
|
||||
onValueChange={(value) => setValue("is_active", value === "true")}
|
||||
error={errors.is_active?.message}
|
||||
/>
|
||||
/> */}
|
||||
</form>
|
||||
</Modal>
|
||||
);
|
||||
|
||||
@ -141,14 +141,14 @@ export const NewDesignationModal = ({
|
||||
/>
|
||||
</div>
|
||||
|
||||
<FormSelect
|
||||
{/* <FormSelect
|
||||
label="Status"
|
||||
required
|
||||
options={statusOptions}
|
||||
value={String(statusValue)}
|
||||
onValueChange={(value) => setValue("is_active", value === "true")}
|
||||
error={errors.is_active?.message}
|
||||
/>
|
||||
/> */}
|
||||
</form>
|
||||
</Modal>
|
||||
);
|
||||
|
||||
@ -30,7 +30,13 @@ const newModuleSchema = z.object({
|
||||
.min(1, 'runtime_language is required')
|
||||
.max(50, 'runtime_language must be at most 50 characters'),
|
||||
framework: z.string().max(50, 'framework must be at most 50 characters').optional().nullable(),
|
||||
webhookurl: z.string().max(500, "webhookurl must be at most 500 characters").url("Invalid URL format").nullable(),
|
||||
webhookurl: z
|
||||
.union([
|
||||
z.string().url("Invalid URL format").max(500, "webhookurl must be at most 500 characters"),
|
||||
z.literal("").transform(() => null),
|
||||
z.null(),
|
||||
])
|
||||
.optional(),
|
||||
frontend_base_url: z
|
||||
.string()
|
||||
.min(1, 'frontend_base_url is required')
|
||||
|
||||
@ -437,11 +437,11 @@ const Users = (): ReactElement => {
|
||||
label="Status"
|
||||
options={[
|
||||
{ value: "active", label: "Active" },
|
||||
{
|
||||
value: "pending_verification",
|
||||
label: "Pending Verification",
|
||||
},
|
||||
{ value: "inactive", label: "Inactive" },
|
||||
// {
|
||||
// value: "pending_verification",
|
||||
// label: "Pending Verification",
|
||||
// },
|
||||
// { value: "inactive", label: "Inactive" },
|
||||
{ value: "suspended", label: "Suspended" },
|
||||
{ value: "deleted", label: "Deleted" },
|
||||
]}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user