upd: member

Deskripsi:
- detail member
- aktivasi member
- edit member

No Issues
This commit is contained in:
amel
2025-05-05 12:15:24 +08:00
parent be56495383
commit 9756a05d2a
6 changed files with 422 additions and 64 deletions

View File

@@ -17,14 +17,15 @@ type Props = {
category: 'group' | 'status-task' | 'position' | 'role' | 'gender'
idParent?: string
onSelect: (value: { val: string, label: string }) => void
valChoose?: string
}
export default function ModalSelect({ open, close, title, category, idParent, onSelect }: Props) {
export default function ModalSelect({ open, close, title, category, idParent, onSelect, valChoose }: Props) {
const { token, decryptToken } = useAuthSession()
const entityUser = useSelector((state: any) => state.user)
const dispatch = useDispatch()
const entitiesGroup = useSelector((state: any) => state.filterGroup)
const [chooseValue, setChooseValue] = useState({ val: '', label: '' })
const [chooseValue, setChooseValue] = useState({ val: valChoose, label: '' })
const [data, setData] = useState<any>([])
async function handleLoadGroup() {
@@ -65,6 +66,7 @@ export default function ModalSelect({ open, close, title, category, idParent, on
} else if (category == "gender") {
handleLoadGender()
}
setChooseValue({ ...chooseValue, val: valChoose })
}, [dispatch, open]);
function onChoose(val: string, label: string) {