Compare commits
No commits in common. "b6102d0b318699364fe4d6279b739a3c3f88515a" and "682c390220c89d9b009e125e59fa4de9f75686dc" have entirely different histories.
b6102d0b31
...
682c390220
@ -66,6 +66,7 @@ export const NewDepartmentModal = ({
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const statusValue = watch("is_active");
|
||||||
const parentIdValue = watch("parent_id");
|
const parentIdValue = watch("parent_id");
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@ -165,14 +166,14 @@ export const NewDepartmentModal = ({
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* <FormSelect
|
<FormSelect
|
||||||
label="Status"
|
label="Status"
|
||||||
required
|
required
|
||||||
options={statusOptions}
|
options={statusOptions}
|
||||||
value={String(statusValue)}
|
value={String(statusValue)}
|
||||||
onValueChange={(value) => setValue("is_active", value === "true")}
|
onValueChange={(value) => setValue("is_active", value === "true")}
|
||||||
error={errors.is_active?.message}
|
error={errors.is_active?.message}
|
||||||
/> */}
|
/>
|
||||||
</form>
|
</form>
|
||||||
</Modal>
|
</Modal>
|
||||||
);
|
);
|
||||||
|
|||||||
@ -48,6 +48,8 @@ export const NewDesignationModal = ({
|
|||||||
const {
|
const {
|
||||||
register,
|
register,
|
||||||
handleSubmit,
|
handleSubmit,
|
||||||
|
setValue,
|
||||||
|
watch,
|
||||||
reset,
|
reset,
|
||||||
clearErrors,
|
clearErrors,
|
||||||
formState: { errors },
|
formState: { errors },
|
||||||
@ -60,6 +62,8 @@ export const NewDesignationModal = ({
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const statusValue = watch("is_active");
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!isOpen) {
|
if (!isOpen) {
|
||||||
reset();
|
reset();
|
||||||
@ -137,14 +141,14 @@ export const NewDesignationModal = ({
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* <FormSelect
|
<FormSelect
|
||||||
label="Status"
|
label="Status"
|
||||||
required
|
required
|
||||||
options={statusOptions}
|
options={statusOptions}
|
||||||
value={String(statusValue)}
|
value={String(statusValue)}
|
||||||
onValueChange={(value) => setValue("is_active", value === "true")}
|
onValueChange={(value) => setValue("is_active", value === "true")}
|
||||||
error={errors.is_active?.message}
|
error={errors.is_active?.message}
|
||||||
/> */}
|
/>
|
||||||
</form>
|
</form>
|
||||||
</Modal>
|
</Modal>
|
||||||
);
|
);
|
||||||
|
|||||||
@ -30,13 +30,7 @@ const newModuleSchema = z.object({
|
|||||||
.min(1, 'runtime_language is required')
|
.min(1, 'runtime_language is required')
|
||||||
.max(50, 'runtime_language must be at most 50 characters'),
|
.max(50, 'runtime_language must be at most 50 characters'),
|
||||||
framework: z.string().max(50, 'framework must be at most 50 characters').optional().nullable(),
|
framework: z.string().max(50, 'framework must be at most 50 characters').optional().nullable(),
|
||||||
webhookurl: z
|
webhookurl: z.string().max(500, "webhookurl must be at most 500 characters").url("Invalid URL format").nullable(),
|
||||||
.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
|
frontend_base_url: z
|
||||||
.string()
|
.string()
|
||||||
.min(1, 'frontend_base_url is required')
|
.min(1, 'frontend_base_url is required')
|
||||||
|
|||||||
@ -437,11 +437,11 @@ const Users = (): ReactElement => {
|
|||||||
label="Status"
|
label="Status"
|
||||||
options={[
|
options={[
|
||||||
{ value: "active", label: "Active" },
|
{ value: "active", label: "Active" },
|
||||||
// {
|
{
|
||||||
// value: "pending_verification",
|
value: "pending_verification",
|
||||||
// label: "Pending Verification",
|
label: "Pending Verification",
|
||||||
// },
|
},
|
||||||
// { value: "inactive", label: "Inactive" },
|
{ value: "inactive", label: "Inactive" },
|
||||||
{ value: "suspended", label: "Suspended" },
|
{ value: "suspended", label: "Suspended" },
|
||||||
{ value: "deleted", label: "Deleted" },
|
{ value: "deleted", label: "Deleted" },
|
||||||
]}
|
]}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user