diff --git a/public/css/template.scss b/public/css/template.scss index 7b9df2f..f75ee2b 100644 --- a/public/css/template.scss +++ b/public/css/template.scss @@ -1812,4 +1812,8 @@ section { .ant-dropdown .ant-dropdown-menu .ant-dropdown-menu-submenu-title, .ant-dropdown-menu-submenu .ant-dropdown-menu .ant-dropdown-menu-submenu-title { padding: 0; +} + +.ant-spin .ant-spin-dot-holder { + color: var(--primary); } \ No newline at end of file diff --git a/public/css/wave.scss b/public/css/wave.scss index 8ca6b05..fe72bbe 100644 --- a/public/css/wave.scss +++ b/public/css/wave.scss @@ -160,7 +160,7 @@ .content-notif { - position: absolute; + position: relative; z-index: 1; top: 0; width: 100%; diff --git a/public/img/df3eaefe245e849dcba33159a4ccd0d6.png b/public/img/karyawan.png similarity index 100% rename from public/img/df3eaefe245e849dcba33159a4ccd0d6.png rename to public/img/karyawan.png diff --git a/public/sw.js.map b/public/sw.js.map index 7ca3d99..0bc551c 100644 --- a/public/sw.js.map +++ b/public/sw.js.map @@ -1 +1 @@ -{"version":3,"file":"sw.js","sources":["C:/Users/Zame/AppData/Local/Temp/900f456c4aacb311f0fcbfdfe76f4a59/sw.js"],"sourcesContent":["import {registerRoute as workbox_routing_registerRoute} from 'E:/JS PROJECT/das/node_modules/workbox-routing/registerRoute.mjs';\nimport {NetworkFirst as workbox_strategies_NetworkFirst} from 'E:/JS PROJECT/das/node_modules/workbox-strategies/NetworkFirst.mjs';\nimport {NetworkOnly as workbox_strategies_NetworkOnly} from 'E:/JS PROJECT/das/node_modules/workbox-strategies/NetworkOnly.mjs';\nimport {clientsClaim as workbox_core_clientsClaim} from 'E:/JS PROJECT/das/node_modules/workbox-core/clientsClaim.mjs';/**\n * Welcome to your Workbox-powered service worker!\n *\n * You'll need to register this file in your web app.\n * See https://goo.gl/nhQhGp\n *\n * The rest of the code is auto-generated. Please don't update this file\n * directly; instead, make changes to your Workbox build configuration\n * and re-run your build process.\n * See https://goo.gl/2aRDsh\n */\n\n\nimportScripts(\n \n);\n\n\n\n\n\n\n\nself.skipWaiting();\n\nworkbox_core_clientsClaim();\n\n\n\nworkbox_routing_registerRoute(\"/\", new workbox_strategies_NetworkFirst({ \"cacheName\":\"start-url\", plugins: [{ cacheWillUpdate: async ({ request, response, event, state }) => { if (response && response.type === 'opaqueredirect') { return new Response(response.body, { status: 200, statusText: 'OK', headers: response.headers }) } return response } }] }), 'GET');\nworkbox_routing_registerRoute(/.*/i, new workbox_strategies_NetworkOnly({ \"cacheName\":\"dev\", plugins: [] }), 'GET');\n\n\n\n\n"],"names":["importScripts","self","skipWaiting","workbox_core_clientsClaim","workbox_routing_registerRoute","workbox_strategies_NetworkFirst","plugins","cacheWillUpdate","request","response","event","state","type","Response","body","status","statusText","headers","workbox_strategies_NetworkOnly"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgBAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAa,EAEZ,CAAA;EAQDC,CAAI,CAAA,CAAA,CAAA,CAACC,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAE,CAAA;AAElBC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAyB,EAAE,CAAA;AAI3BC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAA6B,CAAC,CAAA,CAAA,CAAG,CAAE,CAAA,CAAA,CAAA,CAAA,CAAIC,oBAA+B,CAA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CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW,EAAC,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA;EAAEZ,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAO,EAAE,CAAA,CAAA;EAAG,CAAC,CAAC,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,CAAC,CAAA;;"} \ No newline at end of file +{"version":3,"file":"sw.js","sources":["C:/Users/Zame/AppData/Local/Temp/921224a5bd3165d633a1c85bf0fdd625/sw.js"],"sourcesContent":["import {registerRoute as workbox_routing_registerRoute} from 'E:/JS PROJECT/das/node_modules/workbox-routing/registerRoute.mjs';\nimport {NetworkFirst as workbox_strategies_NetworkFirst} from 'E:/JS PROJECT/das/node_modules/workbox-strategies/NetworkFirst.mjs';\nimport {NetworkOnly as workbox_strategies_NetworkOnly} from 'E:/JS PROJECT/das/node_modules/workbox-strategies/NetworkOnly.mjs';\nimport {clientsClaim as workbox_core_clientsClaim} from 'E:/JS PROJECT/das/node_modules/workbox-core/clientsClaim.mjs';/**\n * Welcome to your Workbox-powered service worker!\n *\n * You'll need to register this file in your web app.\n * See https://goo.gl/nhQhGp\n *\n * The rest of the code is auto-generated. Please don't update this file\n * directly; instead, make changes to your Workbox build configuration\n * and re-run your build process.\n * See https://goo.gl/2aRDsh\n */\n\n\nimportScripts(\n \n);\n\n\n\n\n\n\n\nself.skipWaiting();\n\nworkbox_core_clientsClaim();\n\n\n\nworkbox_routing_registerRoute(\"/\", new workbox_strategies_NetworkFirst({ \"cacheName\":\"start-url\", plugins: [{ cacheWillUpdate: async ({ request, response, event, state }) => { if (response && response.type === 'opaqueredirect') { return new Response(response.body, { status: 200, statusText: 'OK', headers: response.headers }) } return response } }] }), 'GET');\nworkbox_routing_registerRoute(/.*/i, new workbox_strategies_NetworkOnly({ \"cacheName\":\"dev\", plugins: [] }), 'GET');\n\n\n\n\n"],"names":["importScripts","self","skipWaiting","workbox_core_clientsClaim","workbox_routing_registerRoute","workbox_strategies_NetworkFirst","plugins","cacheWillUpdate","request","response","event","state","type","Response","body","status","statusText","headers","workbox_strategies_NetworkOnly"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgBAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAa,EAEZ,CAAA;EAQDC,CAAI,CAAA,CAAA,CAAA,CAACC,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAE,CAAA;AAElBC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAyB,EAAE,CAAA;AAI3BC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAA6B,CAAC,CAAA,CAAA,CAAG,CAAE,CAAA,CAAA,CAAA,CAAA,CAAIC,oBAA+B,CAAC,CAAA;EAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW,EAAC,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;EAAEC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAO,EAAE,CAAC,CAAA;GAAEC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAA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ardKaryawan.jsx new file mode 100644 index 0000000..fb06326 --- /dev/null +++ b/src/app/main/karyawan/dataKaryawan/daftarKaryawan/CardKaryawan.jsx @@ -0,0 +1,77 @@ +import React, {useEffect, useState} from "react"; +import {Col, Dropdown, Row} from "antd"; +import "./style.scss"; +import {CheckCircleOutlined, CloseCircleOutlined, ContainerOutlined, EditOutlined, SettingOutlined, UserOutlined} from "@ant-design/icons"; + +export default function CardKaryawan({data,modalOpen}) { + + return ( + {data && data?.map((v, k) => { + + let items = [ + { + key: '1', + label: (), + }, + { + key: '2', + label: (), + } + ] + + return ( +
+
+
{v?.karyawanNm}
+
{v?.jabatanNm}
+
+ +
+
+
NIK
+
{v?.nik}
+
+
+
username
+
{v?.username}
+
+
+
telpon/hp
+
{v?.phoneNo}
+
+ +
+ +
+ + + +
+ +
+ {(v?.isActive) ?
+ +
Aktif
+
:
+ +
Tidak Aktif
+
} +
+
+ {(v?.profilePict) ? {"karyawan"} : } + +
+
+ + + ) + })} + +
) +} \ No newline at end of file diff --git a/src/app/main/karyawan/dataKaryawan/daftarKaryawan/FormKaryawan.jsx b/src/app/main/karyawan/dataKaryawan/daftarKaryawan/FormKaryawan.jsx new file mode 100644 index 0000000..ef0a34f --- /dev/null +++ b/src/app/main/karyawan/dataKaryawan/daftarKaryawan/FormKaryawan.jsx @@ -0,0 +1,157 @@ +import {Col, Modal, Row, Spin} from "antd"; +import {CloseOutlined} from "@ant-design/icons"; +import Input from "@/components/util/Input"; +import React, {useEffect, useState} from "react"; +import {useForm} from "react-hook-form"; +import {Helper} from "@/lib/Helper"; +import {DropdownAPI} from "@/lib/DropdownAPI"; + +export default function FormKaryawan({modalStatus, actClose, data, loadingModal,jenis}) { + const [viewReadonly, setViewReadonly] = useState(false) + const [dropdownLoading, setDropdownLoading] = useState(false) + const [dropdown, setDropdown] = useState( + { + roleId : [], + branchId : [], + jabatanId : [], + jenisKelaminId : [], + agamaId : [], + statusKaryawanId : [] + } + ) + + const { + register, setValue, watch, getValues, formState: {errors}, + } = useForm(); + + const dropdownInit = async () => { + setDropdownLoading(true) + let listRole = await DropdownAPI.role(); + let listBranch = await DropdownAPI.cabang(); + let listJabatan = await DropdownAPI.jabatan(); + let listJenisKelamin = await DropdownAPI.jenisKelamin(); + let listAgama = await DropdownAPI.agama(); + let listStatusKaryawan = await DropdownAPI.statusKaryawan(); + + setDropdown({ + roleId : listRole, + branchId : listBranch, + jabatanId : listJabatan, + jenisKelaminId :listJenisKelamin, + agamaId : listAgama, + statusKaryawanId : listStatusKaryawan + }) + setDropdownLoading(false) + } + + const TypeAction = () => { + if(jenis === 'detail'){ + return( + <> + ) + }else{ + return( + + ) + } + } + + useEffect(() => { + if (jenis === 'detail'){ + setViewReadonly(true); + }else{ + + setViewReadonly(false); + } + }, [jenis]); + + useEffect(() => { + if (data){ + setValue('karyawanNm',data?.karyawanNm) + setValue('roleId',data?.roleId) + } + }, [data]); + + useEffect(() => { + dropdownInit() + }, []); + + return ( + +
+ +
+
+
Data Karyawan
+
Data Karyawan
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+ +
+ + + + ) + +} \ No newline at end of file diff --git a/src/app/main/karyawan/dataKaryawan/daftarKaryawan/page.jsx b/src/app/main/karyawan/dataKaryawan/daftarKaryawan/page.jsx new file mode 100644 index 0000000..e5f118e --- /dev/null +++ b/src/app/main/karyawan/dataKaryawan/daftarKaryawan/page.jsx @@ -0,0 +1,98 @@ +"use client" +import SearchInput from "@/components/util/SearchInput"; +import WrapperContent from "@/components/util/WrapperContent"; +import React, {useEffect, useState} from "react"; +import CardKaryawan from "./CardKaryawan"; +import {API} from "@/lib/API"; +import notifStore from "@/store/notifStore"; +import {Modal, Spin} from "antd"; +import {CloseOutlined} from "@ant-design/icons"; +import FormKaryawan from "@/app/main/karyawan/dataKaryawan/daftarKaryawan/FormKaryawan"; + +export default function DaftarKaryawan() { + const {notifOpen} = notifStore() + const [searchText, setSearchText] = useState(null) + const [dataKaryawan, setDataKaryawan] = useState([]) + const [modalKaryawan, setModalKaryawan] = useState({ + loadingModal:false, + modalStatus:false, + jenis:null, + data:[] + }) + + const handleSearch = (event) => { + const handler = setTimeout(() => { + setSearchText(event.target.value); + }, 1000); + return () => { + clearTimeout(handler); + }; + }; + + const getKaryawan = async () => { + let res = await API.GET('/ref/karyawan') + if(res.status !== 200){ + notifOpen("Gagal", res.result.message, "danger"); + return false + } + setDataKaryawan(res.result.data) + } + + const modalOpen = async (id,type) => { + setModalKaryawan(prev => ({ + ...prev, + modalStatus: true, + jenis: type, + loadingModal: true + })); + + let res = await API.GET('/ref/karyawan/'+id) + + setModalKaryawan(prev => ({ + ...prev, + data: res.result, + loadingModal: false + })); + + + } + + useEffect(() => { + getKaryawan() + }, []); + + return(<> + +
+
+
+
+
Data Karyawan
+
Daftar Karyawan
+
+
Daftar Karyawan
+
+
+ +
+
+ +
+ +
+
+
+ { + setModalKaryawan(prev => ({ + ...prev, + modalStatus: false, + loadingModal: false + })); + }} + data={modalKaryawan?.data} /> + ) +} \ No newline at end of file diff --git a/src/app/main/karyawan/dataKaryawan/daftarKaryawan/style.scss b/src/app/main/karyawan/dataKaryawan/daftarKaryawan/style.scss new file mode 100644 index 0000000..a2bbb4a --- /dev/null +++ b/src/app/main/karyawan/dataKaryawan/daftarKaryawan/style.scss @@ -0,0 +1,80 @@ +.card-karyawan{ + background: #fff; + padding: 10px; + border-radius: 25px; + box-shadow: 0px 8px 50px #00000005; + margin-top: 15px; + transition: 0.5s ease-in-out; + + &:hover{ + box-shadow: 0px 25px 50px rgb(0 0 0 / 15%); + } + + .content-title{ + background: #f7f7f7; + padding: 10px 15px; + border-radius: 20px; + width: 60%; + + .name{ + font-weight: 600; + font-size: 14px; + color: var(--dark); + } + .position{ + font-weight: 400; + font-size: 12px; + color: var(--text-muted); + } + } + + .container-karyawan{ + padding: 15px; + } + + .content-karyawan{ + margin-bottom: 15px; + + .title{ + font-size: 12px; + font-weight: 400; + color: var(--text-muted); + } + .value{ + font-size: 13px; + font-weight: 500; + color: #0c111c; + } + } + + .content-status{ + position: absolute; + top: 5px; + right: 20px; + border-radius: 20px; + padding: 3px 30px 3px 10px; + + .status-flag{ + display: flex; + gap: 0px; + font-weight: 400; + font-size: 12px; + } + } + + .content-foto{ + position: absolute; + bottom: 10px; + right: 5px; + + .icon{ + font-size: 180px; + color: rgba(0, 0, 0, 0.05); + } + .img{ + width: 150px; + object-fit: contain; + } + } + +} \ No newline at end of file diff --git a/src/app/main/karyawan/dataKaryawan/divisi/page.jsx b/src/app/main/karyawan/dataKaryawan/divisi/page.jsx new file mode 100644 index 0000000..977de5c --- /dev/null +++ b/src/app/main/karyawan/dataKaryawan/divisi/page.jsx @@ -0,0 +1,64 @@ +"use client" +import {useEffect, useState} from "react"; +import RefTemplate from "@/components/refTemplate/Main"; +import {Helper} from "@/lib/Helper"; + +export default function Page() { + const [listForm, setListForm] = useState() + + const initListForm = async () => { + + // TYPE form + setListForm([ + { + type: 'text', + name: 'divisiNm', + alias: 'Divisi', + maxLength: '150', + required: true, + col: 24 + }]) + } + + useEffect(() => { + initListForm() + }, []); + return ( + <> + a.divisiId - b.divisiId + }, + { + title: "Divisi", + dataIndex: 'divisiNm', + sorter: (a, b) => b.divisiNm.localeCompare(a.divisiNm) + }, + { + title: "Update Terakhir", + render: (_, row) => (Helper.formatDate(row.uptdt,'d-M-Y H:i:s')) + }, + { + title: "Status", + width: '5%', + render: (_, row) => (row.isActive === true ? + Aktif : + Tidak Aktif) + }, + + + ]} + listForm={listForm} + /> + + ) +} \ No newline at end of file diff --git a/src/app/main/karyawan/dataKaryawan/jabatan/page.jsx b/src/app/main/karyawan/dataKaryawan/jabatan/page.jsx new file mode 100644 index 0000000..c342a5f --- /dev/null +++ b/src/app/main/karyawan/dataKaryawan/jabatan/page.jsx @@ -0,0 +1,77 @@ +"use client" +import {useEffect, useState} from "react"; +import RefTemplate from "@/components/refTemplate/Main"; +import {Helper} from "@/lib/Helper"; +import {DropdownAPI} from "@/lib/DropdownAPI"; + +export default function Page() { + const [listForm, setListForm] = useState() + + const initListForm = async () => { + let listDivisi = await DropdownAPI.divisi(); + // TYPE form + setListForm([ + { + type: 'select', + name: 'divisiId', + alias: 'Divisi', + required: true, + listData: listDivisi, + col: 24 + },{ + type: 'text', + name: 'jabatanNm', + alias: 'Jabatan ', + maxLength: '150', + required: true, + col: 24 + }]) + } + + useEffect(() => { + initListForm() + }, []); + return ( + <> + a.jabatanId - b.jabatanId + }, + { + title: "Divisi", + dataIndex: 'divisiNm', + sorter: (a, b) => b.divisiNm.localeCompare(a.divisiNm) + }, + { + title: "Jabatan", + dataIndex: 'jabatanNm', + sorter: (a, b) => b.jabatanNm.localeCompare(a.jabatanNm) + }, + { + title: "Update Terakhir", + render: (_, row) => (Helper.formatDate(row.uptdt,'d-M-Y H:i:s')) + }, + { + title: "Status", + width: '5%', + render: (_, row) => (row.isActive === true ? + Aktif : + Tidak Aktif) + }, + + + ]} + listForm={listForm} + /> + + ) +} \ No newline at end of file diff --git a/src/app/main/karyawan/dataKaryawan/statusKaryawan/page.jsx b/src/app/main/karyawan/dataKaryawan/statusKaryawan/page.jsx new file mode 100644 index 0000000..f058880 --- /dev/null +++ b/src/app/main/karyawan/dataKaryawan/statusKaryawan/page.jsx @@ -0,0 +1,66 @@ +"use client" +import {useEffect, useState} from "react"; +import RefTemplate from "@/components/refTemplate/Main"; +import {Helper} from "@/lib/Helper"; + +export default function Page() { + const [listForm, setListForm] = useState() + + const initListForm = async () => { + + // TYPE form + setListForm([ + { + type: 'text', + name: 'statusKaryawanNm', + alias: 'Status Karyawan', + maxLength: '150', + required: true, + col: 24 + }]) + } + + useEffect(() => { + initListForm() + }, []); + return ( + <> + a.statusKaryawanId - b.statusKaryawanId + }, + { + title: "Status Karyawan", + dataIndex: 'nm', + key: 'nm', + sorter: (a, b) => b.nm.localeCompare(a.nm) + }, + { + title: "Update Terakhir", + render: (_, row) => (Helper.formatDate(row.uptdt,'d-M-Y H:i:s')) + }, + { + title: "Status", + width: '5%', + render: (_, row) => (row.isActive === true ? + Aktif : + Tidak Aktif) + }, + + + ]} + listForm={listForm} + /> + + ) +} \ No newline at end of file diff --git a/src/app/main/karyawan/shift/jenisShift/page.jsx b/src/app/main/karyawan/shift/jenisShift/page.jsx new file mode 100644 index 0000000..977de5c --- /dev/null +++ b/src/app/main/karyawan/shift/jenisShift/page.jsx @@ -0,0 +1,64 @@ +"use client" +import {useEffect, useState} from "react"; +import RefTemplate from "@/components/refTemplate/Main"; +import {Helper} from "@/lib/Helper"; + +export default function Page() { + const [listForm, setListForm] = useState() + + const initListForm = async () => { + + // TYPE form + setListForm([ + { + type: 'text', + name: 'divisiNm', + alias: 'Divisi', + maxLength: '150', + required: true, + col: 24 + }]) + } + + useEffect(() => { + initListForm() + }, []); + return ( + <> + a.divisiId - b.divisiId + }, + { + title: "Divisi", + dataIndex: 'divisiNm', + sorter: (a, b) => b.divisiNm.localeCompare(a.divisiNm) + }, + { + title: "Update Terakhir", + render: (_, row) => (Helper.formatDate(row.uptdt,'d-M-Y H:i:s')) + }, + { + title: "Status", + width: '5%', + render: (_, row) => (row.isActive === true ? + Aktif : + Tidak Aktif) + }, + + + ]} + listForm={listForm} + /> + + ) +} \ No newline at end of file diff --git a/src/app/main/manajemenData/referensi/wilayah/page.jsx b/src/app/main/manajemenData/referensi/wilayah/page.jsx new file mode 100644 index 0000000..9ae4694 --- /dev/null +++ b/src/app/main/manajemenData/referensi/wilayah/page.jsx @@ -0,0 +1,63 @@ +"use client" +import {useEffect, useState} from "react"; +import RefTemplate from "@/components/refTemplate/Main"; +import {Helper} from "@/lib/Helper"; + +export default function Page() { + const [listForm, setListForm] = useState() + + const initListForm = async () => { + + // TYPE form + setListForm([ + { + type: 'text', + name: 'divisiNm', + alias: 'Divisi', + maxLength: '150', + required: true, + col: 24 + }]) + } + + useEffect(() => { + initListForm() + }, []); + return ( + <> + ((row.uptdt) ? Helper.formatDate(row.uptdt,'d-M-Y H:i:s'):'-') + }, + // { + // title: "Status", + // width: '5%', + // render: (_, row) => (row.isActive === true ? + // Aktif : + // Tidak Aktif) + // }, + + + ]} + listForm={listForm} + /> + + ) +} \ No newline at end of file diff --git a/src/components/refTemplate/Main.jsx b/src/components/refTemplate/Main.jsx index 5e4b0ac..a93121e 100644 --- a/src/components/refTemplate/Main.jsx +++ b/src/components/refTemplate/Main.jsx @@ -219,22 +219,20 @@ const RefTemplate = ({ }) } - if (listAction.includes('active') && !isWaitingApproval) { - if (row.active) { - items.push({ - key: "5", label: (), - }); - } else { - items.push({ - key: "4", label: (), - }); - } + if (listAction.includes('active')) { + items.push({ + key: '6', + label: ( + (row.isActive) ? + + : + + ), + }) } if (listAction.includes('history_approval')) { diff --git a/src/components/util/Input/InputSelect.jsx b/src/components/util/Input/InputSelect.jsx index 636cff7..c539904 100644 --- a/src/components/util/Input/InputSelect.jsx +++ b/src/components/util/Input/InputSelect.jsx @@ -1,4 +1,4 @@ -import {Select} from 'antd'; +import {Select, Spin} from 'antd'; const InputSelect = ({ title, @@ -33,8 +33,10 @@ const InputSelect = ({ return ( <> +
+