Facebook
From Şükrü Tulga, 1 Year ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 251
  1. import React, { useEffect, useState } from "react";
  2. import DataTable, { TableColumn } from "react-data-table-component";
  3. import { MuiFileInput } from "mui-file-input";
  4. import CloseIcon from "@mui/icons-material/Close";
  5. import AttachFileIcon from "@mui/icons-material/AttachFile";
  6. import EditIcon from "@mui/icons-material/Edit";
  7. import SortIcon from "@mui/icons-material/Sort";
  8. import AddCardIcon from "@mui/icons-material/AddCard";
  9. import {
  10.   Stack,
  11.   Typography,
  12.   TextField,
  13.   InputLabel,
  14.   Button,
  15.   Paper,
  16.   AlertColor,
  17.   Dialog,
  18.   DialogTitle,
  19.   DialogContent,
  20.   DialogActions,
  21. } from "@mui/material";
  22. import { LoadingButton } from "@mui/lab";
  23. import {
  24.   IntiyacGirisSorgulaProps,
  25.   paginationComponentOptions,
  26.   customStyles,
  27. } from "../../props/PropsTypes";
  28. import {
  29.   DonemTanim,
  30.   GorevFonksiyon,
  31.   GorevFonksiyonGrup,
  32.   HipKayitSureciDetay,
  33.   Kisi,
  34.   YetenekAdi,
  35.   YetenekAlani,
  36.   YetenekGrubu,
  37. } from "../../types/EntityTypes";
  38. import DeleteButtonWithConfim from "../../components/common/DeleteButtonWithConfirm";
  39. import ProceedButtonWithConfim from "../../components/common/ProceedButtonWithConfirm";
  40. import RejectButtonWithConfim from "../../components/common/RejectButtonWithConfirm";
  41. import MessageBox from "../../components/common/MessageBox";
  42. import moment from "moment";
  43. import "moment/locale/tr";
  44. import {
  45.   hipDetayListesi,
  46.   hipDetayAdd,
  47.   hipDetayUpdate,
  48.   hipDetayUpdateForInceleme4,
  49.   hipDetayUpdateForInceleme6,
  50.   hipDetayDelete,
  51.   donemListesi,
  52.   getMevcutKisi,
  53.   yetenekAlanAdiListesi,
  54.   yetenekGruplariByAlanId,
  55.   yetenekAdlariByGrupId,
  56.   hipOnayaGonder,
  57.   hipOnayla,
  58.   hipGeriGonder,
  59. } from "../../assets/apilinks/HipLinks";
  60. import { ComboSingleSelect } from "../../components/common/ComboSingleSelect";
  61. import { ComboItem, Visibility, evetHayirList } from "../../types/CommonTypes";
  62. import HttpService from "../../security/HttpService";
  63. import {
  64.   gorevFonksiyonuListesi,
  65.   gorevFonksiyonGrubuByFonksiyonId,
  66. } from "../../assets/apilinks/GorevLinks";
  67.  
  68. HttpService.Configure();
  69.  
  70. export default function IhtiyacGiris() {
  71.   const [btnIhtiyacGorunur, setBtnIhtiyacGorunur] =
  72.     useState<Visibility>("hidden");
  73.   const [mevcutKisi, setMevcutKisi] = useState<Kisi | null>(null);
  74.   const [aramaKriteri, setAramaKriteri] = useState<string>("");
  75.   const [btnIsLoading, setBtnIsLoading] = useState(true);
  76.   const [ihtiyacEkleDialogOpen, setIhtiyacEkleDialogOpen] =
  77.     useState<boolean>(false);
  78.  
  79.   const [ihtiyacGuncelleDialogOpen, setIhtiyacGuncelleDialogOpen] =
  80.     useState<boolean>(false);
  81.  
  82.   const [hipKayitSureciDetayList, setHipKayitSureciDetayList] = useState<
  83.     HipKayitSureciDetay[]
  84.   >([]);
  85.  
  86.   const [snackbarOpen, setSnackbarOpen] = useState<boolean>(false);
  87.   const [snackbarMessage, setSnackbarMessage] = useState<string>("");
  88.   const [snackbarSeverity, setSnackbarSeverity] =
  89.     useState&lt;AlertColor&gt;("success");
  90.  
  91.   const [donemList, setDonemList] = useState<DonemTanim[]>([]);
  92.   const [gorevFonksiyonList, setGorevFonksiyonList] = useState<
  93.     GorevFonksiyon[]
  94.   >([]);
  95.   const [gorevFonksiyonGrupList, setGorevFonksiyonGrupList] = useState<
  96.     GorevFonksiyonGrup[]
  97.   >([]);
  98.  
  99.   const [yetenekAlaniList, setYetenekAlaniList] = useState<YetenekAlani[]>([]);
  100.   const [yetenekGrubuList, setYetenekGrubuList] = useState<YetenekGrubu[]>([]);
  101.   const [yetenekAdiList, setYetenekAdiList] = useState<YetenekAdi[]>([]);
  102.  
  103.   const [hipGuncelleHipDetayId, setHipGuncelleHipDetayId] = useState(0);
  104.   const [hipEkleDonemId, setHipEkleDonemId] = useState(0);
  105.   const [hipGuncelleDonemId, setHipGuncelleDonemId] = useState(0);
  106.   const [hipEkleGorevFonksiyonId, setHipEkleGorevFonksiyonId] = useState(0);
  107.   const [hipGuncelleGorevFonksiyonId, setHipGuncelleGorevFonksiyonId] =
  108.     useState(0);
  109.   const [hipEkleGorevFonksiyonGrupId, setHipEkleGorevFonksiyonGrupId] =
  110.     useState(0);
  111.   const [hipEkleProjeNumarasi, setHipEkleProjeNumarasi] = useState("");
  112.   const [fileResim, setFileResim] = useState<File | null>(null);
  113.   const [filePtd, setFilePtd] = useState<File | null>(null);
  114.   const [fileHiad, setFileHiad] = useState<File | null>(null);
  115.   const [fileIssf, setFileIssf] = useState<File | null>(null);
  116.   const [hipEkleTeknikOzellikler, setHipEkleTeknikOzellikler] = useState("");
  117.   const [hipEkleIhtiyacMakamiOncelik, setHipEkleIhtiyacMakamiOncelik] =
  118.     useState(0);
  119.   const [hipEkleMuhtelif, setHipEkleMuhtelif] = useState("0");
  120.   const [hipEkleTopHarekatIhtiyaci, setHipEkleTopHarekatIhtiyaci] = useState<
  121.     number | string
  122.   >(0);
  123.   const [hipEkleMevcutMiktar, setHipEkleMevcutMiktar] = useState<
  124.     number | string
  125.   >(0);
  126.   const [hipEklePlanDonemiIhtiyacMiktar, setHipEklePlanDonemiIhtiyacMiktar] =
  127.     useState<number | string>(0);
  128.  
  129.   //İnceleme 4
  130.   const [hipEkleYetenekAlaniId, setHipEkleYetenekAlaniId] = useState(0);
  131.   const [hipEkleYetenekGrubuId, setHipEkleYetenekGrubuId] = useState(0);
  132.   const [hipEkleYetenekAdiId, setHipEkleYetenekAdiId] = useState(0);
  133.   const [hipEkleGnkurBskOncelik, setHipEkleGnkurBskOncelik] = useState(0);
  134.   const [
  135.     ihtiyacGuncelleForInceleme4DialogOpen,
  136.     setIhtiyacGuncelleForInceleme4DialogOpen,
  137.   ] = useState(false);
  138.  
  139.   //İnceleme 6
  140.   const [hipEklePortfoyGrubu, setHipEklePortfoyGrubu] = useState(0);
  141.   const [
  142.     ihtiyacGuncelleForInceleme6DialogOpen,
  143.     setIhtiyacGuncelleForInceleme6DialogOpen,
  144.   ] = useState(false);
  145.  
  146.   const columnsHipKayitSureciDetay: TableColumn<HipKayitSureciDetay>[] = [
  147.     {
  148.       name: "İşlem Numarası",
  149.       sortable: true,
  150.       selector: (row) => row.id,
  151.       width: "auto",
  152.       wrap: false,
  153.     },
  154.     {
  155.       name: "Onaya Gönder",
  156.       button: true,
  157.       wrap: false,
  158.       cell: (row) =>
  159.         row.projeDurumu === "rolInceleme1" ? (
  160.           <ProceedButtonWithConfim
  161.             idToProceed={String(row.id)}
  162.              
  163.             message="Seçili kaydı onaya göndermek istediğinize emin misiniz ?"
  164.           />
  165.         ) : (
  166.           <></>
  167.         ),
  168.     },
  169.     {
  170.       name: "Onayla",
  171.       button: true,
  172.       wrap: false,
  173.       cell: (row) =>
  174.         row.projeDurumu !== "rolInceleme1" ? (
  175.           <ProceedButtonWithConfim
  176.             idToProceed={String(row.id)}
  177.              
  178.             message="Seçili kaydı onaylamak istediğinize emin misiniz ?"
  179.           />
  180.         ) : (
  181.           <></>
  182.         ),
  183.     },
  184.     {
  185.       name: "Geri Gönder",
  186.       button: true,
  187.       wrap: false,
  188.       cell: (row) =>
  189.         row.projeDurumu !== "rolInceleme1" ? (
  190.           <RejectButtonWithConfim
  191.             idToReject={String(row.id)}
  192.               rejectMessage) =>
  193.               handleGeriGonder(id, rejectMessage)
  194.             }
  195.             message="Seçili kaydı geri göndermek istediğinize emin misiniz ?"
  196.           />
  197.         ) : (
  198.           <></>
  199.         ),
  200.     },
  201.     {
  202.       name: "Düzenle",
  203.       button: true,
  204.       wrap: false,
  205.       cell: (row) => (
  206.         <Button
  207.           variant="contained"
  208.           size="small"
  209.             => handleGuncelle(String(row.id))}
  210.         >
  211.           <EditIcon />
  212.         </Button>
  213.       ),
  214.     },
  215.     {
  216.       name: "İhtiyac Makamı",
  217.       sortable: true,
  218.       selector: (row) => row.ihtiyacMakam.orgAdi,
  219.       width: "auto",
  220.       wrap: false,
  221.     },
  222.     {
  223.       name: "Dönem",
  224.       sortable: true,
  225.       selector: (row) => row.donem.donemAdi,
  226.       width: "auto",
  227.       wrap: false,
  228.     },
  229.     {
  230.       name: "Görev Fonksiyonu",
  231.       sortable: true,
  232.       selector: (row) => row.gorevFonksiyon.gorevFonksiyonAdi,
  233.       width: "auto",
  234.       wrap: false,
  235.     },
  236.     {
  237.       name: "Görev Fonksiyon Grubu",
  238.       sortable: true,
  239.       selector: (row) => row.gorevFonksiyonGrup.gorevFonksiyonGrupAdi,
  240.       width: "auto",
  241.       wrap: false,
  242.     },
  243.     {
  244.       name: "Portföy Grubu",
  245.       sortable: true,
  246.       selector: (row) => row.portfoyGrubu,
  247.       width: "auto",
  248.       wrap: false,
  249.     },
  250.     {
  251.       name: "Teknik Özellikler",
  252.       sortable: true,
  253.       selector: (row) => row.teknikOzellikler,
  254.       width: "auto",
  255.       wrap: false,
  256.     },
  257.     {
  258.       name: "Proje Durumu",
  259.       sortable: true,
  260.       selector: (row) =>
  261.         row.projeDurumu === "rolInceleme1"
  262.           ? "Taslak"
  263.           : row.projeDurumu.substring(3, row.projeDurumu.length) +
  264.             " kullanıcısından onay bekliyor.",
  265.       width: "auto",
  266.       wrap: false,
  267.     },
  268.     {
  269.       name: "Yetenek Alanı",
  270.       sortable: true,
  271.       selector: (row) => row.yetenekAlani?.yetenekAlanAdi,
  272.       width: "auto",
  273.       wrap: false,
  274.     },
  275.     {
  276.       name: "Yetenek Grubu",
  277.       sortable: true,
  278.       selector: (row) => row.yetenekGrubu?.yetenekGrubAdi,
  279.       width: "auto",
  280.       wrap: false,
  281.     },
  282.     {
  283.       name: "Yetenek Adı",
  284.       sortable: true,
  285.       selector: (row) => row.yetenekAdi?.yetenekTanim,
  286.       width: "auto",
  287.       wrap: false,
  288.     },
  289.     {
  290.       name: "İhtiyaç Makamı Öncelik",
  291.       sortable: true,
  292.       selector: (row) => row.ihtiyacMakamiOncelik,
  293.       width: "auto",
  294.       wrap: false,
  295.     },
  296.     {
  297.       name: "Genel Kurmay Başkanlığı Öncelik",
  298.       sortable: true,
  299.       selector: (row) => row.gnkurBskOncelik,
  300.       width: "auto",
  301.       wrap: false,
  302.     },
  303.     {
  304.       name: "Muhtelif",
  305.       sortable: true,
  306.       selector: (row) => (row.muhtelif === 1 ? "Evet" : "Hayır"),
  307.       width: "auto",
  308.       wrap: false,
  309.     },
  310.     {
  311.       name: "Toplam Harekat İhtiyacı Miktarı",
  312.       sortable: true,
  313.       selector: (row) =>
  314.         row.topHarekatIhtiyaci === 0 ? "Muhtelif" : row.topHarekatIhtiyaci,
  315.       width: "auto",
  316.       wrap: false,
  317.     },
  318.     {
  319.       name: "Mevcut Miktar",
  320.       sortable: true,
  321.       selector: (row) =>
  322.         row.mevcutMiktar === 0 ? "Muhtelif" : row.mevcutMiktar,
  323.       width: "auto",
  324.       wrap: false,
  325.     },
  326.     {
  327.       name: "Plan Dönemi İhtiyaç Miktarı",
  328.       sortable: true,
  329.       selector: (row) =>
  330.         row.planDonemiIhtiyacMiktar === 0
  331.           ? "Muhtelif"
  332.           : row.planDonemiIhtiyacMiktar,
  333.       width: "auto",
  334.       wrap: false,
  335.     },
  336.     {
  337.       name: "Ekleyen Kişi",
  338.       sortable: true,
  339.       selector: (row) =>
  340.         row.ekleyenKisiNavigation.ad + " " + row.ekleyenKisiNavigation.soyad,
  341.       width: "auto",
  342.       wrap: false,
  343.     },
  344.     {
  345.       name: "Ekleme Tarihi",
  346.       sortable: true,
  347.       selector: (row) => moment(row.eklemeTarihi).locale("tr").format("lll"),
  348.       width: "auto",
  349.       wrap: false,
  350.     },
  351.     {
  352.       name: "Sil",
  353.       button: true,
  354.       wrap: false,
  355.       cell: (row) =>
  356.         Number(row.ekleyenKisi) === mevcutKisi?.id ? (
  357.           <DeleteButtonWithConfim
  358.             idToDelete={String(row.id)}
  359.              
  360.           />
  361.         ) : (
  362.           <></>
  363.         ),
  364.     },
  365.   ];
  366.  
  367.   const fetchData = async (url: string, data: any, setData: Function) => {
  368.     debugger;
  369.     try {
  370.       const response = await HttpService.GetAxiosClient().post(url, data);
  371.       console.log("Data fetched successfully:", response.data);
  372.       setData(response.data);
  373.     } catch (error: any) {
  374.       console.error("Error fetching data:", error.response.data);
  375.       // Handle error according to your application's requirements
  376.     } finally {
  377.       // setLoading(false);
  378.     }
  379.   };
  380.  
  381.   const fetchDataGet = async (url: string, setData: Function) => {
  382.     try {
  383.       const response = await HttpService.GetAxiosClient().get(url);
  384.       console.log("Data fetched successfully:", response.data);
  385.       setData(response.data);
  386.     } catch (error: any) {
  387.       console.error("Error fetching data:", error.response.data);
  388.       // Handle error according to your application's requirements
  389.     } finally {
  390.       // setLoading(false);
  391.     }
  392.   };
  393.  
  394.   const kisiSorgula = async () => {
  395.     await fetchDataGet(getMevcutKisi, setMevcutKisiMain);
  396.   };
  397.  
  398.   const setMevcutKisiMain = async (data: any) => {
  399.     setMevcutKisi(data);
  400.     if (data.mevcutRol === "rolInceleme1") {
  401.       setBtnIhtiyacGorunur("visible");
  402.     } else {
  403.       setBtnIhtiyacGorunur("hidden");
  404.     }
  405.   };
  406.  
  407.   const donemSorgula = async () => {
  408.     await fetchData(donemListesi, { DonemTipTanimId: null }, setDonemList);
  409.   };
  410.  
  411.   const gorevFonksiyonSorgula = async () => {
  412.     await fetchData(
  413.       gorevFonksiyonuListesi,
  414.       { aramaKriteri: "" },
  415.       setGorevFonksiyonList
  416.     );
  417.   };
  418.  
  419.   const yetenekAlaniSorgula = async () => {
  420.     await fetchData(
  421.       yetenekAlanAdiListesi,
  422.       { aramaKriteri: "" },
  423.       setYetenekAlaniList
  424.     );
  425.   };
  426.  
  427.   useEffect(() => {
  428.     const fetchDataSequentially = async () => {
  429.       await kisiSorgula();
  430.       await donemSorgula();
  431.       await gorevFonksiyonSorgula();
  432.       await yetenekAlaniSorgula();
  433.       setBtnIsLoading(false);
  434.     };
  435.  
  436.     fetchDataSequentially();
  437.   }, []);
  438.  
  439.   const yetenekGrubuSorgula = async (id: number) => {
  440.     await HttpService.GetAxiosClient()
  441.       .post(yetenekGruplariByAlanId + "?YetenekAlaniId=" + id)
  442.       .then((response) =&gt; {
  443.         setYetenekGrubuList(response.data);
  444.       })
  445.       .catch((error) =&gt; {
  446.         console.log(error.response.data);
  447.       });
  448.   };
  449.  
  450.   useEffect(() =&gt; {
  451.     yetenekGrubuSorgula(hipEkleYetenekAlaniId);
  452.   }, [hipEkleYetenekAlaniId]);
  453.  
  454.   const yetenekAdiSorgula = async (id: number) =&gt; {
  455.     await HttpService.GetAxiosClient()
  456.       .post(yetenekAdlariByGrupId + "?YetenekGrubuId=" + id)
  457.       .then((response) =&gt; {
  458.         setYetenekAdiList(response.data);
  459.       })
  460.       .catch((error) =&gt; {
  461.         console.log(error.response.data);
  462.       });
  463.   };
  464.  
  465.   useEffect(() =&gt; {
  466.     yetenekAdiSorgula(hipEkleYetenekGrubuId);
  467.   }, [hipEkleYetenekGrubuId]);
  468.  
  469.   useEffect(() =&gt; {
  470.     if (hipEkleMuhtelif === "1") {
  471.       setHipEkleTopHarekatIhtiyaci("Muhtelif");
  472.       setHipEklePlanDonemiIhtiyacMiktar("Muhtelif");
  473.       setHipEkleMevcutMiktar("Muhtelif");
  474.     } else {
  475.       setHipEkleTopHarekatIhtiyaci("0");
  476.       setHipEklePlanDonemiIhtiyacMiktar("0");
  477.       setHipEkleMevcutMiktar("0");
  478.     }
  479.   }, [hipEkleMuhtelif]);
  480.  
  481.   const gorevFonksiyonGrupSorgula = async (id: number) => {
  482.     await HttpService.GetAxiosClient()
  483.       .post(gorevFonksiyonGrubuByFonksiyonId + "?GorevFonksiyonId=" + id)
  484.       .then((response) =&gt; {
  485.         setGorevFonksiyonGrupList(response.data);
  486.       })
  487.       .catch((error) =&gt; {
  488.         console.log(error.response.data);
  489.       });
  490.   };
  491.  
  492.   useEffect(() =&gt; {
  493.     gorevFonksiyonGrupSorgula(hipEkleGorevFonksiyonId);
  494.   }, [hipEkleGorevFonksiyonId]);
  495.  
  496.   const sorgula = async () =&gt; {
  497.     const data = {
  498.       aramaKriteri: aramaKriteri,
  499.     };
  500.     await HttpService.GetAxiosClient()
  501.       .post(hipDetayListesi, data)
  502.       .then((response) =&gt; {
  503.         setHipKayitSureciDetayList(response.data);
  504.         setBtnIsLoading(false);
  505.       })
  506.       .catch((error) =&gt; {
  507.         console.log(error.response.data);
  508.       });
  509.   };
  510.  
  511.   const handleSorgula = () =&gt; {
  512.     setBtnIsLoading(true);
  513.     sorgula();
  514.   };
  515.  
  516.   const handleChangeResim = (newFile: File | null) =&gt; {
  517.     setFileResim(newFile);
  518.   };
  519.  
  520.   const handleChangePtd = (newFile: File | null) =&gt; {
  521.     setFilePtd(newFile);
  522.   };
  523.  
  524.   const handleChangeHiad = (newFile: File | null) =&gt; {
  525.     setFileHiad(newFile);
  526.   };
  527.  
  528.   const handleChangeIssf = (newFile: File | null) =&gt; {
  529.     setFileIssf(newFile);
  530.   };
  531.  
  532.   const handleAddSubmit = () =&gt; {
  533.     setBtnIsLoading(true);
  534.     const data = {
  535.       HipKayitId: 0,
  536.       IhtiyacMakamId: mevcutKisi?.orgId,
  537.       DonemId: hipEkleDonemId,
  538.       GorevFonksiyonId: hipEkleGorevFonksiyonId,
  539.       GorevFonksiyonGrupId: hipEkleGorevFonksiyonGrupId,
  540.       PortfoyGrubu: null,
  541.       ProjeNumarasi: hipEkleProjeNumarasi,
  542.       Resim: fileResim,
  543.       TeknikOzellikler: hipEkleTeknikOzellikler,
  544.       ProjeDurumu: "",
  545.       YetenekAlaniId: null, //hipEkleYetenekAdiId,
  546.       YetenekGrubuId: null, //hipEkleYetenekGrubuId,
  547.       YetenekAdiId: null, //hipEkleYetenekAdiId,
  548.       IhtiyacMakamiOncelik: hipEkleIhtiyacMakamiOncelik,
  549.       GnkurBskOncelik: null,
  550.       Muhtelif: hipEkleMuhtelif,
  551.       TopHarekatIhtiyaci:
  552.         hipEkleTopHarekatIhtiyaci === "Muhtelif"
  553.           ? "0"
  554.           : hipEkleTopHarekatIhtiyaci,
  555.       MevcutMiktar:
  556.         hipEkleMevcutMiktar === "Muhtelif" ? "0" : hipEkleMevcutMiktar,
  557.       PlanDonemiIhtiyacMiktar:
  558.         hipEklePlanDonemiIhtiyacMiktar === "Muhtelif"
  559.           ? "0"
  560.           : hipEklePlanDonemiIhtiyacMiktar,
  561.       ProjeTanimlamaDokumani: filePtd,
  562.       HareketIhtiyacAnalizDokumani: fileHiad,
  563.       IkinciSorgulamaSonucFormu: fileIssf,
  564.     };
  565.     const addHip = async () => {
  566.       await HttpService.GetAxiosClient()
  567.         .post(hipDetayAdd, data, {
  568.           headers: {
  569.             "Content-Type": "multipart/form-data",
  570.           },
  571.         })
  572.         .then(() => {
  573.           setSnackbarOpen(true);
  574.           setSnackbarSeverity("success");
  575.           setSnackbarMessage("Yeni HİP eklendi.");
  576.         })
  577.         .catch((e) => {
  578.           console.log(e);
  579.           setSnackbarOpen(true);
  580.           setSnackbarSeverity("error");
  581.           setSnackbarMessage("Hata ile karşılaşıldı.");
  582.         })
  583.         .finally(() => {
  584.           sorgula();
  585.         });
  586.     };
  587.     addHip();
  588.     clearIhtiyacEkleModal();
  589.   };
  590.  
  591.   const handleUpdateSubmit = () => {
  592.     const data = {
  593.       // donemId: hipEkleDonemId,
  594.       // gorevFonksiyonId: hipEkleGorevFonksiyonId,
  595.       // gorevFonksiyonGrupId: hipEkleGorevFonksiyonGrupId,
  596.       // projeNumarasi: hipEkleProjeNumarasi,
  597.       // //resim: File;
  598.       // teknikOzellikler: hipEkleTeknikOzellikler,
  599.       // //projeDurumu: string;
  600.       // ihtiyacMakamiOncelik: hipEkleIhtiyacMakamiOncelik,
  601.       // muhtelif: hipEkleMuhtelif,
  602.       // topHarekatIhtiyaci: hipEkleTopHarekatIhtiyaci,
  603.       // mevcutMiktar: hipEkleMevcutMiktar,
  604.       // planDonemiIhtiyacMiktar: hipEklePlanDonemiIhtiyacMiktar,
  605.       // //projeTanimlamaDokumani: File;
  606.       // //hareketIhtiyacAnalizDokumani: File;
  607.       // //ikinciSorgulamaSonucFormu: File;
  608.     };
  609.     const updateHip = async () => {
  610.       await HttpService.GetAxiosClient()
  611.         .post(hipDetayUpdate, data)
  612.         .then(() => {
  613.           setSnackbarOpen(true);
  614.           setSnackbarSeverity("success");
  615.           setSnackbarMessage("Kayıt güncellendi.");
  616.         })
  617.         .catch((e) => {
  618.           console.log(e);
  619.           setSnackbarOpen(true);
  620.           setSnackbarSeverity("error");
  621.           setSnackbarMessage("Hata ile karşılaşıldı.");
  622.         })
  623.         .finally(() => {
  624.           sorgula();
  625.         });
  626.     };
  627.     updateHip();
  628.     clearIhtiyacGuncelleModal();
  629.   };
  630.  
  631.   const handleGuncelle = (idToUpdate: string) => {
  632.     setHipGuncelleHipDetayId(Number(idToUpdate));
  633.     let hipDetay = hipKayitSureciDetayList.filter(
  634.       (t) => t.id === Number(idToUpdate)
  635.     )[0];
  636.     if (mevcutKisi?.mevcutRol === "rolInceleme1") {
  637.       if (hipDetay.projeDurumu === "rolInceleme1") {
  638.         setIhtiyacGuncelleDialogOpen(true);
  639.       } else {
  640.         setSnackbarOpen(true);
  641.         setSnackbarSeverity("error");
  642.         setSnackbarMessage(
  643.           "Düzenleme yetkiniz yoktur. Lütfen onayınızı kaldırın."
  644.         );
  645.       }
  646.     } else if (mevcutKisi?.mevcutRol === "rolInceleme4") {
  647.       setIhtiyacGuncelleForInceleme4DialogOpen(true);
  648.     } else if (mevcutKisi?.mevcutRol === "rolInceleme6") {
  649.       setIhtiyacGuncelleForInceleme6DialogOpen(true);
  650.     } else {
  651.       setSnackbarOpen(true);
  652.       setSnackbarSeverity("error");
  653.       setSnackbarMessage(
  654.         "Düzenleme yetkiniz yoktur. Lütfen onay işleminizi gerçekleştirin."
  655.       );
  656.     }
  657.   };
  658.  
  659.   const handleOnayaGonder = (idToUpdate: string) => {
  660.     setBtnIsLoading(true);
  661.     const data = {
  662.       Id: idToUpdate,
  663.     };
  664.     const updateForOnayaGonder = async () => {
  665.       await HttpService.GetAxiosClient()
  666.         .post(hipOnayaGonder, data)
  667.         .then(() => {
  668.           setSnackbarOpen(true);
  669.           setSnackbarSeverity("success");
  670.           setSnackbarMessage("Mevcut kayıt güncellendi.");
  671.         })
  672.         .catch((e) => {
  673.           console.log(e);
  674.           setSnackbarOpen(true);
  675.           setSnackbarSeverity("error");
  676.           setSnackbarMessage("Hata ile karşılaşıldı.");
  677.         })
  678.         .finally(() => {
  679.           sorgula();
  680.         });
  681.     };
  682.     updateForOnayaGonder();
  683.   };
  684.  
  685.   const handleOnayla = (idToConfirm: string) => {
  686.     debugger;
  687.     let devam = true;
  688.     let hipDetay = hipKayitSureciDetayList.filter(
  689.       (t) => t.id === Number(idToConfirm)
  690.     )[0];
  691.     if (
  692.       mevcutKisi?.mevcutRol === "rolInceleme4" ||
  693.       mevcutKisi?.mevcutRol === "rolInceleme6"
  694.     ) {
  695.       if (
  696.         mevcutKisi?.mevcutRol === "rolInceleme4" &&
  697.         !(
  698.           hipDetay.gnkurBskOncelik != null ||
  699.           hipDetay.yetenekAlaniId != null ||
  700.           hipDetay.yetenekGrubuId != null ||
  701.           hipDetay.yetenekAdiId != null
  702.         )
  703.       ) {
  704.         devam = false;
  705.       }
  706.       if (
  707.         mevcutKisi?.mevcutRol === "rolInceleme6" &&
  708.         hipDetay.portfoyGrubu == null
  709.       ) {
  710.         devam = false;
  711.       }
  712.     }
  713.     if (devam) {
  714.       setBtnIsLoading(true);
  715.       const data = {
  716.         Id: idToConfirm,
  717.       };
  718.       const updateForOnay = async () => {
  719.         await HttpService.GetAxiosClient()
  720.           .post(hipOnayla, data)
  721.           .then(() => {
  722.             setSnackbarOpen(true);
  723.             setSnackbarSeverity("success");
  724.             setSnackbarMessage("Mevcut kayıt güncellendi.");
  725.           })
  726.           .catch((e) => {
  727.             console.log(e);
  728.             setSnackbarOpen(true);
  729.             setSnackbarSeverity("error");
  730.             setSnackbarMessage("Hata ile karşılaşıldı.");
  731.           })
  732.           .finally(() => {
  733.             sorgula();
  734.           });
  735.       };
  736.       updateForOnay();
  737.     } else {
  738.       setSnackbarOpen(true);
  739.       setSnackbarSeverity("error");
  740.       setSnackbarMessage(
  741.         "Lütfen onaylamadan önce düzenleme işleminizi gerçekleştirin."
  742.       );
  743.     }
  744.   };
  745.  
  746.   const handleGeriGonder = (idToConfirm: string, rejectMessage: string) => {
  747.     setBtnIsLoading(true);
  748.     const data = {
  749.       Id: idToConfirm,
  750.       RedMesaji: rejectMessage,
  751.     };
  752.     const updateForOnayGeriGonder = async () => {
  753.       await HttpService.GetAxiosClient()
  754.         .post(hipGeriGonder, data)
  755.         .then(() => {
  756.           setSnackbarOpen(true);
  757.           setSnackbarSeverity("success");
  758.           setSnackbarMessage("Mevcut kayıt güncellendi.");
  759.         })
  760.         .catch((e) => {
  761.           console.log(e);
  762.           setSnackbarOpen(true);
  763.           setSnackbarSeverity("error");
  764.           setSnackbarMessage("Hata ile karşılaşıldı.");
  765.         })
  766.         .finally(() => {
  767.           sorgula();
  768.         });
  769.     };
  770.     updateForOnayGeriGonder();
  771.   };
  772.  
  773.   const handleUpdateSubmitForInceleme4 = () => {
  774.     const data = {
  775.       Id: hipGuncelleHipDetayId,
  776.       YetenekAlaniId: hipEkleYetenekAlaniId,
  777.       YetenekGrubuId: hipEkleYetenekGrubuId,
  778.       YetenekAdiId: hipEkleYetenekAdiId,
  779.       GnkurBskOncelik: hipEkleGnkurBskOncelik,
  780.     };
  781.     const updateHipForInceleme4 = async () => {
  782.       await HttpService.GetAxiosClient()
  783.         .post(hipDetayUpdateForInceleme4, data)
  784.         .then(() => {
  785.           setSnackbarOpen(true);
  786.           setSnackbarSeverity("success");
  787.           setSnackbarMessage("Kayıt güncellendi.");
  788.         })
  789.         .catch((e) => {
  790.           console.log(e);
  791.           setSnackbarOpen(true);
  792.           setSnackbarSeverity("error");
  793.           setSnackbarMessage("Hata ile karşılaşıldı.");
  794.         })
  795.         .finally(() => {
  796.           sorgula();
  797.         });
  798.     };
  799.     updateHipForInceleme4();
  800.     clearIhtiyacGuncelleModal();
  801.   };
  802.  
  803.   const handleUpdateSubmitForInceleme6 = () => {
  804.     const data = {
  805.       id: hipGuncelleHipDetayId,
  806.       portfoyGrubu: hipEklePortfoyGrubu,
  807.     };
  808.     const updateHipForInceleme6 = async () => {
  809.       await HttpService.GetAxiosClient()
  810.         .post(hipDetayUpdateForInceleme6, data)
  811.         .then(() => {
  812.           setSnackbarOpen(true);
  813.           setSnackbarSeverity("success");
  814.           setSnackbarMessage("Kayıt güncellendi.");
  815.         })
  816.         .catch((e) => {
  817.           console.log(e);
  818.           setSnackbarOpen(true);
  819.           setSnackbarSeverity("error");
  820.           setSnackbarMessage("Hata ile karşılaşıldı.");
  821.         })
  822.         .finally(() => {
  823.           sorgula();
  824.         });
  825.     };
  826.     updateHipForInceleme6();
  827.     clearIhtiyacGuncelleModal();
  828.   };
  829.  
  830.   const handleDelete = (idToDelete: string) => {
  831.     const deleteHip = async () => {
  832.       await HttpService.GetAxiosClient()
  833.         .get(hipDetayDelete + "?HipKayitSureciDetayId=" + idToDelete)
  834.         .then(() =&gt; {
  835.           deleteSuccessFnc();
  836.         })
  837.         .catch((e) =&gt; {
  838.           console.log(e);
  839.           setSnackbarOpen(true);
  840.           setSnackbarSeverity("error");
  841.           setSnackbarMessage("Hata ile karşılaşıldı.");
  842.         });
  843.     };
  844.     deleteHip();
  845.   };
  846.  
  847.   const btnTemizleClick = () => {
  848.     setAramaKriteri("");
  849.   };
  850.  
  851.   const clearIhtiyacEkleModal = () => {
  852.     setIhtiyacEkleDialogOpen(false);
  853.     setHipEkleDonemId(0);
  854.     setHipEkleGorevFonksiyonId(0);
  855.     setHipEkleGorevFonksiyonGrupId(0);
  856.     setHipEklePortfoyGrubu(0);
  857.     setHipEkleProjeNumarasi("");
  858.     setFileResim(null);
  859.     setHipEkleTeknikOzellikler("");
  860.     setHipEkleIhtiyacMakamiOncelik(0);
  861.     setHipEkleGnkurBskOncelik(0);
  862.     setHipEkleMuhtelif("0");
  863.     setHipEkleTopHarekatIhtiyaci(0);
  864.     setHipEkleMevcutMiktar(0);
  865.     setHipEklePlanDonemiIhtiyacMiktar(0);
  866.     setFilePtd(null);
  867.     setFileHiad(null);
  868.     setFileIssf(null);
  869.   };
  870.  
  871.   const clearIhtiyacGuncelleModal = () => {
  872.     if (mevcutKisi?.mevcutRol === "rolInceleme1") {
  873.       setIhtiyacGuncelleDialogOpen(false);
  874.     } else if (mevcutKisi?.mevcutRol === "rolInceleme4") {
  875.       setIhtiyacGuncelleForInceleme4DialogOpen(false);
  876.     } else if (mevcutKisi?.mevcutRol === "rolInceleme6") {
  877.       setIhtiyacGuncelleForInceleme6DialogOpen(false);
  878.     }
  879.   };
  880.  
  881.   const deleteSuccessFnc = () => {
  882.     sorgula();
  883.     setSnackbarOpen(true);
  884.     setSnackbarSeverity("success");
  885.     setSnackbarMessage("HİP bilgisi silindi.");
  886.   };
  887.  
  888.   const mesajKutusu = () => {
  889.     return (
  890.       <MessageBox
  891.         isOpen={snackbarOpen}
  892.         message={snackbarMessage}
  893.         severity={snackbarSeverity}
  894.           => setSnackbarOpen(false)}
  895.       />
  896.     );
  897.   };
  898.  
  899.   const ihtiyacEkleModal = () => {
  900.     return (
  901.       <>
  902.         <Dialog
  903.           open={ihtiyacEkleDialogOpen}
  904.             => setIhtiyacEkleDialogOpen(false)}
  905.           fullWidth
  906.           maxWidth="md"
  907.         >
  908.           <DialogTitle>Yeni Harekat İhtiyaç Planı Ekle</DialogTitle>
  909.           <DialogContent>
  910.             <Stack display="flex" flexDirecti alignItems="center">
  911.               &lt;InputLabel
  912.                 sx={{
  913.                   width: "325px",
  914.                   position: "relative",
  915.                 }}
  916.               &gt;
  917.                 <p>Dönem :</p>
  918.               &lt;/InputLabel&gt;
  919.               <ComboSingleSelect
  920.                 itemList={donemList.map<ComboItem>((item) => ({
  921.                   value: String(item.id),
  922.                   name: item.donemAdi,
  923.                 }))}
  924.                 handleOnChange={(newValue) =>
  925.                   setHipEkleDonemId(Number(newValue))
  926.                 }
  927.                 itemLabel="Dönem"
  928.                 width="350px"
  929.               />
  930.             </Stack>
  931.             <Stack display="flex" flexDirecti alignItems="center">
  932.               &lt;InputLabel
  933.                 sx={{
  934.                   width: "325px",
  935.                   position: "relative",
  936.                 }}
  937.               &gt;
  938.                 <p>Görev Fonksiyonu :</p>
  939.               &lt;/InputLabel&gt;
  940.               <ComboSingleSelect
  941.                 itemList={gorevFonksiyonList.map<ComboItem>((item) => ({
  942.                   value: String(item.id),
  943.                   name: item.gorevFonksiyonAdi,
  944.                 }))}
  945.                 handleOnChange={(newValue) =>
  946.                   setHipEkleGorevFonksiyonId(Number(newValue))
  947.                 }
  948.                 itemLabel="Görev Fonksiyonu"
  949.                 width="350px"
  950.               />
  951.             </Stack>
  952.             <Stack display="flex" flexDirecti alignItems="center">
  953.               &lt;InputLabel
  954.                 sx={{
  955.                   width: "325px",
  956.                   position: "relative",
  957.                 }}
  958.               &gt;
  959.                 <p>Görev Fonksiyon Grubu :</p>
  960.               &lt;/InputLabel&gt;
  961.               <ComboSingleSelect
  962.                 itemList={gorevFonksiyonGrupList.map<ComboItem>((item) => ({
  963.                   value: String(item.id),
  964.                   name: item.gorevFonksiyonGrupAdi,
  965.                 }))}
  966.                 handleOnChange={(newValue) =>
  967.                   setHipEkleGorevFonksiyonGrupId(Number(newValue))
  968.                 }
  969.                 itemLabel="Görev Fonksiyon Grubu"
  970.                 width="350px"
  971.               />
  972.             </Stack>
  973.             <Stack display="flex" flexDirecti alignItems="center">
  974.               &lt;InputLabel sx={{ width: "325px", position: "relative" }}&gt;
  975.                 <p>Proje Numarası :</p>
  976.               &lt;/InputLabel&gt;
  977.               <TextField
  978.                 placeholder="Proje numarası"
  979.                 required
  980.                 type="text"
  981.                 size="small"
  982.                 value={hipEkleProjeNumarasi}
  983.                   => setHipEkleProjeNumarasi(e.target.value)}
  984.                 sx={{ width: "350px" }}
  985.               ></TextField>
  986.             </Stack>
  987.             <Stack display="flex" flexDirecti alignItems="center">
  988.               &lt;InputLabel sx={{ width: "325px", position: "relative" }}&gt;
  989.                 <p>Resim :</p>
  990.               &lt;/InputLabel&gt;
  991.               <MuiFileInput
  992.                 value={fileResim}
  993.                  
  994.                 placeholder="Dosya seçmek için tıklayınız"
  995.                 sx={{ width: "350px" }}
  996.                  clearIc
  997.                   title: "Sil",
  998.                   children: <CloseIcon f />,
  999.                 }}
  1000.                 InputProps={{
  1001.                   inputProps: {
  1002.                     accept: ".png, .jpeg",
  1003.                   },
  1004.                   startAdornment: <AttachFileIcon />,
  1005.                   size: "small",
  1006.                 }}
  1007.               />
  1008.             </Stack>
  1009.             <Stack display="flex" flexDirecti alignItems="center">
  1010.               &lt;InputLabel sx={{ width: "325px", position: "relative" }}&gt;
  1011.                 <p>Teknik Özellikler :</p>
  1012.               &lt;/InputLabel&gt;
  1013.               <TextField
  1014.                 placeholder="Teknik Özellikler"
  1015.                 required
  1016.                 type="text"
  1017.                 size="small"
  1018.                 multiline
  1019.                 rows={4}
  1020.                 value={hipEkleTeknikOzellikler}
  1021.                   => setHipEkleTeknikOzellikler(e.target.value)}
  1022.                 sx={{ width: "350px" }}
  1023.               ></TextField>
  1024.             </Stack>
  1025.             <Stack display="flex" flexDirecti alignItems="center">
  1026.               &lt;InputLabel sx={{ width: "325px", position: "relative" }}&gt;
  1027.                 <p>İhtiyaç Makamı Öncelik :</p>
  1028.               &lt;/InputLabel&gt;
  1029.               <TextField
  1030.                 placeholder="İhtiyaç Makamı Öncelik"
  1031.                 required
  1032.                 type="number"
  1033.                 size="small"
  1034.                 value={hipEkleIhtiyacMakamiOncelik}
  1035.                   =>
  1036.                   setHipEkleIhtiyacMakamiOncelik(Number(e.target.value))
  1037.                 }
  1038.               ></TextField>
  1039.             </Stack>
  1040.             <Stack display="flex" flexDirecti alignItems="center">
  1041.               &lt;InputLabel
  1042.                 sx={{
  1043.                   width: "325px",
  1044.                   position: "relative",
  1045.                 }}
  1046.               &gt;
  1047.                 <p>Muhtelif :</p>
  1048.               &lt;/InputLabel&gt;
  1049.               <ComboSingleSelect
  1050.                 itemList={evetHayirList.list.map<ComboItem>((item) => ({
  1051.                   value: item.value,
  1052.                   name: item.name,
  1053.                 }))}
  1054.                 handleOnChange={(newValue) => setHipEkleMuhtelif(newValue)}
  1055.                 itemLabel="Muhtelif"
  1056.                 width="350px"
  1057.                 selectedValue={hipEkleMuhtelif}
  1058.               />
  1059.             </Stack>
  1060.             <Stack display="flex" flexDirecti alignItems="center">
  1061.               &lt;InputLabel sx={{ width: "325px", position: "relative" }}&gt;
  1062.                 <p>Toplam Harekat İhtiyacı :</p>
  1063.               &lt;/InputLabel&gt;
  1064.               <TextField
  1065.                 placeholder="Toplam Harekat İhtiyacı"
  1066.                 required
  1067.                 type="text"
  1068.                 size="small"
  1069.                 value={hipEkleTopHarekatIhtiyaci}
  1070.                   =>
  1071.                   setHipEkleTopHarekatIhtiyaci(Number(e.target.value))
  1072.                 }
  1073.               ></TextField>
  1074.             </Stack>
  1075.             <Stack display="flex" flexDirecti alignItems="center">
  1076.               &lt;InputLabel sx={{ width: "325px", position: "relative" }}&gt;
  1077.                 <p>Mevcut Miktar :</p>
  1078.               &lt;/InputLabel&gt;
  1079.               <TextField
  1080.                 placeholder="Mevcut Miktar"
  1081.                 required
  1082.                 type="text"
  1083.                 size="small"
  1084.                 value={hipEkleMevcutMiktar}
  1085.                   => setHipEkleMevcutMiktar(Number(e.target.value))}
  1086.               ></TextField>
  1087.             </Stack>
  1088.             <Stack display="flex" flexDirecti alignItems="center">
  1089.               &lt;InputLabel sx={{ width: "325px", position: "relative" }}&gt;
  1090.                 <p>Plan Dönemi İhtiyaç Miktarı :</p>
  1091.               &lt;/InputLabel&gt;
  1092.               <TextField
  1093.                 placeholder="Plan Dönemi İhtiyaç Miktarı"
  1094.                 required
  1095.                 type="text"
  1096.                 size="small"
  1097.                 value={hipEklePlanDonemiIhtiyacMiktar}
  1098.                   =>
  1099.                   setHipEklePlanDonemiIhtiyacMiktar(Number(e.target.value))
  1100.                 }
  1101.               ></TextField>
  1102.             </Stack>
  1103.             <Stack display="flex" flexDirecti alignItems="center">
  1104.               &lt;InputLabel sx={{ width: "325px", position: "relative" }}&gt;
  1105.                 <p>Proje Tanımlama Dokümanı (PTD) :</p>
  1106.               &lt;/InputLabel&gt;
  1107.               <MuiFileInput
  1108.                 value={filePtd}
  1109.                  
  1110.                 placeholder="Dosya seçmek için tıklayınız"
  1111.                 sx={{ width: "350px" }}
  1112.                  clearIc
  1113.                   title: "Sil",
  1114.                   children: <CloseIcon f />,
  1115.                 }}
  1116.                 InputProps={{
  1117.                   inputProps: {
  1118.                     accept: ".pdf",
  1119.                   },
  1120.                   startAdornment: <AttachFileIcon />,
  1121.                   size: "small",
  1122.                 }}
  1123.               />
  1124.             </Stack>
  1125.             <Stack display="flex" flexDirecti alignItems="center">
  1126.               &lt;InputLabel sx={{ width: "325px", position: "relative" }}&gt;
  1127.                 <p>Harekat İhtiyaç Analiz Dokümanı (HİAD) :</p>
  1128.               &lt;/InputLabel&gt;
  1129.               <MuiFileInput
  1130.                 value={fileHiad}
  1131.                  
  1132.                 placeholder="Dosya seçmek için tıklayınız"
  1133.                 sx={{ width: "350px" }}
  1134.                  clearIc
  1135.                   title: "Sil",
  1136.                   children: <CloseIcon f />,
  1137.                 }}
  1138.                 InputProps={{
  1139.                   inputProps: {
  1140.                     accept: ".pdf",
  1141.                   },
  1142.                   startAdornment: <AttachFileIcon />,
  1143.                   size: "small",
  1144.                 }}
  1145.               />
  1146.             </Stack>
  1147.             <Stack display="flex" flexDirecti alignItems="center">
  1148.               &lt;InputLabel sx={{ width: "325px", position: "relative" }}&gt;
  1149.                 <p>2'nci Sorgulama Sonuç Formu :</p>
  1150.               &lt;/InputLabel&gt;
  1151.               <MuiFileInput
  1152.                 value={fileIssf}
  1153.                  
  1154.                 placeholder="Dosya seçmek için tıklayınız"
  1155.                 sx={{ width: "350px" }}
  1156.                  clearIc
  1157.                   title: "Sil",
  1158.                   children: <CloseIcon f />,
  1159.                 }}
  1160.                 InputProps={{
  1161.                   inputProps: {
  1162.                     accept: ".pdf",
  1163.                   },
  1164.                   startAdornment: <AttachFileIcon />,
  1165.                   size: "small",
  1166.                 }}
  1167.               />
  1168.             </Stack>
  1169.           </DialogContent>
  1170.           <DialogActions>
  1171.             <Button
  1172.               color="success"
  1173.               variant="contained"
  1174.                
  1175.             >
  1176.               Ekle
  1177.             </Button>
  1178.             <Button
  1179.               variant="outlined"
  1180.                 => {
  1181.                 setIhtiyacEkleDialogOpen(false);
  1182.                 clearIhtiyacEkleModal();
  1183.               }}
  1184.             >
  1185.               İptal
  1186.             </Button>
  1187.           </DialogActions>
  1188.         </Dialog>
  1189.       </>
  1190.     );
  1191.   };
  1192.  
  1193.   const ihtiyacGuncelleModal = () => {
  1194.     return (
  1195.       <>
  1196.         <Dialog
  1197.           open={ihtiyacGuncelleDialogOpen}
  1198.             => setIhtiyacGuncelleDialogOpen(false)}
  1199.           fullWidth
  1200.           maxWidth="md"
  1201.         >
  1202.           <DialogTitle>Harekat İhtiyaç Planı Güncelle</DialogTitle>
  1203.           <DialogContent>
  1204.             <Stack display="flex" flexDirecti alignItems="center">
  1205.               &lt;InputLabel
  1206.                 sx={{
  1207.                   width: "325px",
  1208.                   position: "relative",
  1209.                 }}
  1210.               &gt;
  1211.                 <p>Dönem :</p>
  1212.               &lt;/InputLabel&gt;
  1213.               <ComboSingleSelect
  1214.                 itemList={donemList.map<ComboItem>((item) => ({
  1215.                   value: String(item.id),
  1216.                   name: item.donemAdi,
  1217.                 }))}
  1218.                 handleOnChange={(newValue) =>
  1219.                   setHipGuncelleDonemId(Number(newValue))
  1220.                 }
  1221.                 itemLabel="Dönem"
  1222.                 selectedValue={hipGuncelleDonemId.toString()}
  1223.                 width="350px"
  1224.               />
  1225.             </Stack>
  1226.             <Stack display="flex" flexDirecti alignItems="center">
  1227.               &lt;InputLabel
  1228.                 sx={{
  1229.                   width: "325px",
  1230.                   position: "relative",
  1231.                 }}
  1232.               &gt;
  1233.                 <p>Görev Fonksiyonu :</p>
  1234.               &lt;/InputLabel&gt;
  1235.               <ComboSingleSelect
  1236.                 itemList={gorevFonksiyonList.map<ComboItem>((item) => ({
  1237.                   value: String(item.id),
  1238.                   name: item.gorevFonksiyonAdi,
  1239.                 }))}
  1240.                 handleOnChange={(newValue) =>
  1241.                   setHipGuncelleGorevFonksiyonId(Number(newValue))
  1242.                 }
  1243.                 itemLabel="Görev Fonksiyonu"
  1244.                 selectedValue={hipGuncelleGorevFonksiyonId.toString()}
  1245.                 width="350px"
  1246.               />
  1247.             </Stack>
  1248.             <Stack display="flex" flexDirecti alignItems="center">
  1249.               &lt;InputLabel
  1250.                 sx={{
  1251.                   width: "325px",
  1252.                   position: "relative",
  1253.                 }}
  1254.               &gt;
  1255.                 <p>Görev Fonksiyon Grubu :</p>
  1256.               &lt;/InputLabel&gt;
  1257.               <ComboSingleSelect
  1258.                 itemList={gorevFonksiyonGrupList.map<ComboItem>((item) => ({
  1259.                   value: String(item.id),
  1260.                   name: item.gorevFonksiyonGrupAdi,
  1261.                 }))}
  1262.                 handleOnChange={(newValue) =>
  1263.                   setHipEkleGorevFonksiyonGrupId(Number(newValue))
  1264.                 }
  1265.                 itemLabel="Görev Fonksiyon Grubu"
  1266.                 width="350px"
  1267.               />
  1268.             </Stack>
  1269.             <Stack display="flex" flexDirecti alignItems="center">
  1270.               &lt;InputLabel sx={{ width: "325px", position: "relative" }}&gt;
  1271.                 <p>Proje Numarası :</p>
  1272.               &lt;/InputLabel&gt;
  1273.               <TextField
  1274.                 placeholder="Proje numarası"
  1275.                 required
  1276.                 type="text"
  1277.                 size="small"
  1278.                 value={hipEkleProjeNumarasi}
  1279.                   => setHipEkleProjeNumarasi(e.target.value)}
  1280.                 sx={{ width: "350px" }}
  1281.               ></TextField>
  1282.             </Stack>
  1283.             <Stack display="flex" flexDirecti alignItems="center">
  1284.               &lt;InputLabel sx={{ width: "325px", position: "relative" }}&gt;
  1285.                 <p>Resim :</p>
  1286.               &lt;/InputLabel&gt;
  1287.               <MuiFileInput
  1288.                 value={fileResim}
  1289.                  
  1290.                 placeholder="Dosya seçmek için tıklayınız"
  1291.                 sx={{ width: "350px" }}
  1292.                  clearIc
  1293.                   title: "Sil",
  1294.                   children: <CloseIcon f />,
  1295.                 }}
  1296.                 InputProps={{
  1297.                   inputProps: {
  1298.                     accept: ".png, .jpeg",
  1299.                   },
  1300.                   startAdornment: <AttachFileIcon />,
  1301.                   size: "small",
  1302.                 }}
  1303.               />
  1304.             </Stack>
  1305.             <Stack display="flex" flexDirecti alignItems="center">
  1306.               &lt;InputLabel sx={{ width: "325px", position: "relative" }}&gt;
  1307.                 <p>Teknik Özellikler :</p>
  1308.               &lt;/InputLabel&gt;
  1309.               <TextField
  1310.                 placeholder="Teknik Özellikler"
  1311.                 required
  1312.                 type="text"
  1313.                 size="small"
  1314.                 multiline
  1315.                 rows={4}
  1316.                 value={hipEkleTeknikOzellikler}
  1317.                   => setHipEkleTeknikOzellikler(e.target.value)}
  1318.                 sx={{ width: "350px" }}
  1319.               ></TextField>
  1320.             </Stack>
  1321.             <Stack display="flex" flexDirecti alignItems="center">
  1322.               &lt;InputLabel sx={{ width: "325px", position: "relative" }}&gt;
  1323.                 <p>İhtiyaç Makamı Öncelik :</p>
  1324.               &lt;/InputLabel&gt;
  1325.               <TextField
  1326.                 placeholder="İhtiyaç Makamı Öncelik"
  1327.                 required
  1328.                 type="number"
  1329.                 size="small"
  1330.                 value={hipEkleIhtiyacMakamiOncelik}
  1331.                   =>
  1332.                   setHipEkleIhtiyacMakamiOncelik(Number(e.target.value))
  1333.                 }
  1334.               ></TextField>
  1335.             </Stack>
  1336.             <Stack display="flex" flexDirecti alignItems="center">
  1337.               &lt;InputLabel
  1338.                 sx={{
  1339.                   width: "325px",
  1340.                   position: "relative",
  1341.                 }}
  1342.               &gt;
  1343.                 <p>Muhtelif :</p>
  1344.               &lt;/InputLabel&gt;
  1345.               <ComboSingleSelect
  1346.                 itemList={evetHayirList.list.map<ComboItem>((item) => ({
  1347.                   value: item.value,
  1348.                   name: item.name,
  1349.                 }))}
  1350.                 handleOnChange={(newValue) => setHipEkleMuhtelif(newValue)}
  1351.                 itemLabel="Muhtelif"
  1352.                 width="350px"
  1353.                 selectedValue={hipEkleMuhtelif}
  1354.               />
  1355.             </Stack>
  1356.             <Stack display="flex" flexDirecti alignItems="center">
  1357.               &lt;InputLabel sx={{ width: "325px", position: "relative" }}&gt;
  1358.                 <p>Toplam Harekat İhtiyacı :</p>
  1359.               &lt;/InputLabel&gt;
  1360.               <TextField
  1361.                 placeholder="Toplam Harekat İhtiyacı"
  1362.                 required
  1363.                 type="text"
  1364.                 size="small"
  1365.                 value={hipEkleTopHarekatIhtiyaci}
  1366.                   =>
  1367.                   setHipEkleTopHarekatIhtiyaci(Number(e.target.value))
  1368.                 }
  1369.               ></TextField>
  1370.             </Stack>
  1371.             <Stack display="flex" flexDirecti alignItems="center">
  1372.               &lt;InputLabel sx={{ width: "325px", position: "relative" }}&gt;
  1373.                 <p>Mevcut Miktar :</p>
  1374.               &lt;/InputLabel&gt;
  1375.               <TextField
  1376.                 placeholder="Mevcut Miktar"
  1377.                 required
  1378.                 type="text"
  1379.                 size="small"
  1380.                 value={hipEkleMevcutMiktar}
  1381.                   => setHipEkleMevcutMiktar(Number(e.target.value))}
  1382.               ></TextField>
  1383.             </Stack>
  1384.             <Stack display="flex" flexDirecti alignItems="center">
  1385.               &lt;InputLabel sx={{ width: "325px", position: "relative" }}&gt;
  1386.                 <p>Plan Dönemi İhtiyaç Miktarı :</p>
  1387.               &lt;/InputLabel&gt;
  1388.               <TextField
  1389.                 placeholder="Plan Dönemi İhtiyaç Miktarı"
  1390.                 required
  1391.                 type="text"
  1392.                 size="small"
  1393.                 value={hipEklePlanDonemiIhtiyacMiktar}
  1394.                   =>
  1395.                   setHipEklePlanDonemiIhtiyacMiktar(Number(e.target.value))
  1396.                 }
  1397.               ></TextField>
  1398.             </Stack>
  1399.             <Stack display="flex" flexDirecti alignItems="center">
  1400.               &lt;InputLabel sx={{ width: "325px", position: "relative" }}&gt;
  1401.                 <p>Proje Tanımlama Dokümanı (PTD) :</p>
  1402.               &lt;/InputLabel&gt;
  1403.               <MuiFileInput
  1404.                 value={filePtd}
  1405.                  
  1406.                 placeholder="Dosya seçmek için tıklayınız"
  1407.                 sx={{ width: "350px" }}
  1408.                  clearIc
  1409.                   title: "Sil",
  1410.                   children: <CloseIcon f />,
  1411.                 }}
  1412.                 InputProps={{
  1413.                   inputProps: {
  1414.                     accept: ".pdf",
  1415.                   },
  1416.                   startAdornment: <AttachFileIcon />,
  1417.                   size: "small",
  1418.                 }}
  1419.               />
  1420.             </Stack>
  1421.             <Stack display="flex" flexDirecti alignItems="center">
  1422.               &lt;InputLabel sx={{ width: "325px", position: "relative" }}&gt;
  1423.                 <p>Harekat İhtiyaç Analiz Dokümanı (HİAD) :</p>
  1424.               &lt;/InputLabel&gt;
  1425.               <MuiFileInput
  1426.                 value={fileHiad}
  1427.                  
  1428.                 placeholder="Dosya seçmek için tıklayınız"
  1429.                 sx={{ width: "350px" }}
  1430.                  clearIc
  1431.                   title: "Sil",
  1432.                   children: <CloseIcon f />,
  1433.                 }}
  1434.                 InputProps={{
  1435.                   inputProps: {
  1436.                     accept: ".pdf",
  1437.                   },
  1438.                   startAdornment: <AttachFileIcon />,
  1439.                   size: "small",
  1440.                 }}
  1441.               />
  1442.             </Stack>
  1443.             <Stack display="flex" flexDirecti alignItems="center">
  1444.               &lt;InputLabel sx={{ width: "325px", position: "relative" }}&gt;
  1445.                 <p>2'nci Sorgulama Sonuç Formu :</p>
  1446.               &lt;/InputLabel&gt;
  1447.               <MuiFileInput
  1448.                 value={fileIssf}
  1449.                  
  1450.                 placeholder="Dosya seçmek için tıklayınız"
  1451.                 sx={{ width: "350px" }}
  1452.                  clearIc
  1453.                   title: "Sil",
  1454.                   children: <CloseIcon f />,
  1455.                 }}
  1456.                 InputProps={{
  1457.                   inputProps: {
  1458.                     accept: ".pdf",
  1459.                   },
  1460.                   startAdornment: <AttachFileIcon />,
  1461.                   size: "small",
  1462.                 }}
  1463.               />
  1464.             </Stack>
  1465.           </DialogContent>
  1466.           <DialogActions>
  1467.             <Button
  1468.               color="success"
  1469.               variant="contained"
  1470.                
  1471.             >
  1472.               Kaydet
  1473.             </Button>
  1474.             <Button
  1475.               variant="outlined"
  1476.                 => {
  1477.                 setIhtiyacEkleDialogOpen(false);
  1478.                 clearIhtiyacEkleModal();
  1479.               }}
  1480.             >
  1481.               İptal
  1482.             </Button>
  1483.           </DialogActions>
  1484.         </Dialog>
  1485.       </>
  1486.     );
  1487.   };
  1488.   const intiyacGuncelleForInceleme4Modal = () => {
  1489.     return (
  1490.       <>
  1491.         <Dialog
  1492.           open={ihtiyacGuncelleForInceleme4DialogOpen}
  1493.             => setIhtiyacGuncelleForInceleme4DialogOpen(false)}
  1494.           fullWidth
  1495.           maxWidth="md"
  1496.         >
  1497.           <DialogTitle>Harekat İhtiyaç Planı Bilgileri</DialogTitle>
  1498.           <DialogContent>
  1499.             <Stack display="flex" flexDirecti alignItems="center">
  1500.               &lt;InputLabel
  1501.                 sx={{
  1502.                   width: "250px",
  1503.                   position: "relative",
  1504.                 }}
  1505.               &gt;
  1506.                 <p>Yetenek Alanı :</p>
  1507.               &lt;/InputLabel&gt;
  1508.               <ComboSingleSelect
  1509.                 itemList={yetenekAlaniList.map<ComboItem>((item) => ({
  1510.                   value: String(item.id),
  1511.                   name: item.yetenekAlanAdi,
  1512.                 }))}
  1513.                 handleOnChange={(newValue) =>
  1514.                   setHipEkleYetenekAlaniId(Number(newValue))
  1515.                 }
  1516.                 itemLabel="Yetenek Alanı"
  1517.                 width="223px"
  1518.               />
  1519.             </Stack>
  1520.             <Stack display="flex" flexDirecti alignItems="center">
  1521.               &lt;InputLabel
  1522.                 sx={{
  1523.                   width: "250px",
  1524.                   position: "relative",
  1525.                 }}
  1526.               &gt;
  1527.                 <p>Yetenek Grubu :</p>
  1528.               &lt;/InputLabel&gt;
  1529.               <ComboSingleSelect
  1530.                 itemList={yetenekGrubuList.map<ComboItem>((item) => ({
  1531.                   value: String(item.id),
  1532.                   name: item.yetenekGrubAdi,
  1533.                 }))}
  1534.                 handleOnChange={(newValue) =>
  1535.                   setHipEkleYetenekGrubuId(Number(newValue))
  1536.                 }
  1537.                 itemLabel="Yetenek Grubu"
  1538.                 width="223px"
  1539.               />
  1540.             </Stack>
  1541.             <Stack display="flex" flexDirecti alignItems="center">
  1542.               &lt;InputLabel
  1543.                 sx={{
  1544.                   width: "250px",
  1545.                   position: "relative",
  1546.                 }}
  1547.               &gt;
  1548.                 <p>Yetenek Adı :</p>
  1549.               &lt;/InputLabel&gt;
  1550.               <ComboSingleSelect
  1551.                 itemList={yetenekAdiList.map<ComboItem>((item) => ({
  1552.                   value: String(item.id),
  1553.                   name: item.yetenekTanim,
  1554.                 }))}
  1555.                 handleOnChange={(newValue) =>
  1556.                   setHipEkleYetenekAdiId(Number(newValue))
  1557.                 }
  1558.                 itemLabel="Yetenek Adı"
  1559.                 width="223px"
  1560.               />
  1561.             </Stack>
  1562.             <Stack display="flex" flexDirecti alignItems="center">
  1563.               &lt;InputLabel sx={{ width: "250px", position: "relative" }}&gt;
  1564.                 <p>Genel Kurmay Başkanlığı Öncelik :</p>
  1565.               &lt;/InputLabel&gt;
  1566.               <TextField
  1567.                 placeholder="Genel Kurmay Başkanlığı Öncelik"
  1568.                 required
  1569.                 type="number"
  1570.                 size="small"
  1571.                 value={hipEkleGnkurBskOncelik}
  1572.                   =>
  1573.                   setHipEkleGnkurBskOncelik(Number(e.target.value))
  1574.                 }
  1575.               ></TextField>
  1576.             </Stack>
  1577.           </DialogContent>
  1578.           <DialogActions>
  1579.             <Button
  1580.               color="success"
  1581.               variant="contained"
  1582.                
  1583.             >
  1584.               Kaydet
  1585.             </Button>
  1586.             <Button
  1587.               variant="outlined"
  1588.                 => {
  1589.                 setIhtiyacGuncelleForInceleme4DialogOpen(false);
  1590.                 clearIhtiyacEkleModal();
  1591.               }}
  1592.             >
  1593.               İptal
  1594.             </Button>
  1595.           </DialogActions>
  1596.         </Dialog>
  1597.       </>
  1598.     );
  1599.   };
  1600.  
  1601.   const intiyacGuncelleForInceleme6Modal = () => {
  1602.     return (
  1603.       <>
  1604.         <Dialog
  1605.           open={ihtiyacGuncelleForInceleme6DialogOpen}
  1606.             => setIhtiyacGuncelleForInceleme6DialogOpen(false)}
  1607.           fullWidth
  1608.           maxWidth="md"
  1609.         >
  1610.           <DialogTitle>Harekat İhtiyaç Planı Bilgileri</DialogTitle>
  1611.           <DialogContent>
  1612.             <Stack display="flex" flexDirecti alignItems="center">
  1613.               &lt;InputLabel sx={{ width: "250px", position: "relative" }}&gt;
  1614.                 <p>Portföy Grubu :</p>
  1615.               &lt;/InputLabel&gt;
  1616.               <TextField
  1617.                 placeholder="Portföy Grubu"
  1618.                 required
  1619.                 type="text"
  1620.                 size="small"
  1621.                 value={hipEklePortfoyGrubu}
  1622.                   => setHipEklePortfoyGrubu(Number(e.target.value))}
  1623.               ></TextField>
  1624.             </Stack>
  1625.           </DialogContent>
  1626.           <DialogActions>
  1627.             <Button
  1628.               color="success"
  1629.               variant="contained"
  1630.                
  1631.             >
  1632.               Kaydet
  1633.             </Button>
  1634.             <Button
  1635.               variant="outlined"
  1636.                 => {
  1637.                 setIhtiyacGuncelleForInceleme6DialogOpen(false);
  1638.                 clearIhtiyacEkleModal();
  1639.               }}
  1640.             >
  1641.               İptal
  1642.             </Button>
  1643.           </DialogActions>
  1644.         </Dialog>
  1645.       </>
  1646.     );
  1647.   };
  1648.  
  1649.   return (
  1650.     <Stack sx={{ marginTop: "10px" }}>
  1651.       <Paper
  1652.          elevati
  1653.         sx={{
  1654.           paddingBottom: "20px",
  1655.         }}
  1656.       >
  1657.         <Stack marginLeft="20px" marginTop="20px">
  1658.           <Typography variant="h6">
  1659.             Harekat İhtiyaçları Planı İşlemleri
  1660.           </Typography>
  1661.         </Stack>
  1662.         <Stack marginLeft="30px">
  1663.           <Stack display="flex" flexDirecti alignItems="center">
  1664.             &lt;InputLabel sx={{ width: "150px", position: "relative" }}&gt;
  1665.               <p>Arama Kriteri:</p>
  1666.             &lt;/InputLabel&gt;
  1667.             <TextField
  1668.               sx={{ width: "350px" }}
  1669.               size="small"
  1670.               variant="outlined"
  1671.               placeholder="Aramak istediğiniz metni giriniz"
  1672.               value={aramaKriteri}
  1673.                 => setAramaKriteri(e.target.value)}
  1674.             />
  1675.           </Stack>
  1676.         </Stack>
  1677.         <Stack directi sx={{ marginTop: "10px" }}>
  1678.           <Stack directi marginLeft="180px" spacing={2}>
  1679.             <LoadingButton
  1680.               loading={btnIsLoading}
  1681.               variant="contained"
  1682.                
  1683.               size="small"
  1684.             >
  1685.               Sorgula
  1686.             </LoadingButton>
  1687.             <Button  variant="outlined" size="small">
  1688.               Temizle
  1689.             </Button>
  1690.           </Stack>
  1691.           <Stack width="170px" display="flex" directi>
  1692.             <Button
  1693.               variant="contained"
  1694.               color="secondary"
  1695.               size="small"
  1696.                 => setIhtiyacEkleDialogOpen(true)}
  1697.               startIcon={<AddCardIcon />}
  1698.               sx={{ visibility: btnIhtiyacGorunur }}
  1699.             >
  1700.               İhtiyaç Girişi
  1701.             </Button>
  1702.           </Stack>
  1703.         </Stack>
  1704.       </Paper>
  1705.       <Paper
  1706.          elevati
  1707.         sx={{
  1708.           marginTop: "20px",
  1709.           paddingBottom: "20px",
  1710.         }}
  1711.       >
  1712.         <Stack>
  1713.           <IhtiyacGirisSorgulamaSonuc
  1714.             columnsHipKayitSureciDetay={columnsHipKayitSureciDetay}
  1715.             hipKayitSureciDetayList={hipKayitSureciDetayList}
  1716.           />
  1717.         </Stack>
  1718.       </Paper>
  1719.       {mesajKutusu()}
  1720.       {ihtiyacEkleModal()}
  1721.       {ihtiyacGuncelleModal()}
  1722.       {intiyacGuncelleForInceleme4Modal()}
  1723.       {intiyacGuncelleForInceleme6Modal()}
  1724.     </Stack>
  1725.   );
  1726. }
  1727.  
  1728. const IhtiyacGirisSorgulamaSonuc: React.FC<IntiyacGirisSorgulaProps> = ({
  1729.   hipKayitSureciDetayList,
  1730.   columnsHipKayitSureciDetay,
  1731. }) => {
  1732.   return (
  1733.     <Stack>
  1734.       <DataTable
  1735.         title="Harekat İhtiyaçları Planı Listesi"
  1736.         highlightOnHover
  1737.         fixedHeader
  1738.         fixedHeaderScrollHeight="500px"
  1739.         columns={columnsHipKayitSureciDetay}
  1740.         data={hipKayitSureciDetayList}
  1741.         defaultSortFieldId="hiyerarsiAdi"
  1742.          sortIc />}
  1743.         pagination
  1744.         striped
  1745.         responsive
  1746.         noDataComponent="Gösterilecek kayıt bulunamadı"
  1747.         paginationComponentOptions={paginationComponentOptions}
  1748.         customStyles={customStyles}
  1749.       />
  1750.     </Stack>
  1751.   );
  1752. };
  1753.