Compare commits
2 Commits
682c390220
...
b6102d0b31
| Author | SHA1 | Date | |
|---|---|---|---|
| b6102d0b31 | |||
| 3f0963d3e8 |
@ -66,7 +66,6 @@ export const NewDepartmentModal = ({
|
||||
},
|
||||
});
|
||||
|
||||
const statusValue = watch("is_active");
|
||||
const parentIdValue = watch("parent_id");
|
||||
|
||||
useEffect(() => {
|
||||
@ -166,14 +165,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>
|
||||
);
|
||||
|
||||
@ -48,8 +48,6 @@ export const NewDesignationModal = ({
|
||||
const {
|
||||
register,
|
||||
handleSubmit,
|
||||
setValue,
|
||||
watch,
|
||||
reset,
|
||||
clearErrors,
|
||||
formState: { errors },
|
||||
@ -62,8 +60,6 @@ export const NewDesignationModal = ({
|
||||
},
|
||||
});
|
||||
|
||||
const statusValue = watch("is_active");
|
||||
|
||||
useEffect(() => {
|
||||
if (!isOpen) {
|
||||
reset();
|
||||
@ -141,14 +137,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