18 Commits

Author SHA1 Message Date
ddd8594372 Refactor PiyangoOnay components to replace refreshList logic with window reload. This change simplifies the refresh mechanism after form submission, enhancing user experience by ensuring the latest data is displayed immediately. 2025-12-11 14:08:02 +03:00
4a081fe249 Update PiyangoDetay component to change conditional rendering for the "Dosya Kapama" tab. The condition now checks for piyangoStore.lotteryApprove === 10 instead of usersStore.isPanelUser && piyangoStore.lotteryDrawState to enhance logic clarity and functionality. 2025-12-11 13:55:19 +03:00
9c2f02d617 Add PiyangoDetay component "Çekiliş Tutanağı" tab. Import new TabPiyangoCekilisTutanagi component and enhance tab list structure for improved user navigation. 2025-12-11 01:16:38 +03:00
927cdfd7e8 Add "Müdürlük" and "Çekiliş Görevlisi" fields to PiyangoOnay components. Update validation logic to ensure these fields are required based on "onayDurumuIslemTipiId". Enhance data handling in the service layer for new fields and update the form structure accordingly. 2025-12-11 00:50:25 +03:00
e8f914b321 Update refreshList logic in PiyangoOnay components to prevent immediate refresh. Introduce a timeout before setting refreshList to true after form submission, ensuring smoother user experience. 2025-12-10 12:34:12 +03:00
bd93496e4d Add new fields for "Müdürlük" and "Çekiliş Görevlisi" in FormPiyangoOnay component. Implement conditional rendering based on "onayDurumuIslemTipiId". Update data store to ensure toast notifications are handled correctly after API calls. 2025-12-10 12:31:25 +03:00
9da5f9946b Refactor filter handling in DashPiyangoListe and ListTableContent components. Updated tableData type to an array and improved query parameter construction for filters, including error handling during navigation. Enhanced filter value retrieval logic to ensure proper text assignment based on available data. 2025-12-09 16:12:49 +03:00
b0386d53e5 Add row deletion functionality and enhance table filters in Piyango views. Implemented confirmation dialog for row deletion and updated filter options for various table columns to improve user experience. 2025-12-09 14:01:25 +03:00
f6c1b242b2 Enhance Piyango and Muhasebe views with additional table headers and computed properties for better data representation. Added global store integration for currency formatting and improved date handling. Updated conditional rendering for user roles and refined filter options. 2025-12-09 07:47:04 +03:00
b422187704 . 2025-12-09 07:35:42 +03:00
678a96d76f dosyaları ayırarak kaydedildiğinde build hatası verenlerin ayrılması kaldırıldı 2025-10-24 20:09:48 +03:00
cb9d2f220f - build için dosyalar ayrı kaydedilecek şekilde düzenleme yapıldı
- gereksiz paketler package.json dan silindi
- Kullanılmayan quill dosyaları silindi
2025-10-24 12:03:32 +03:00
03689a01e3 - Filtreleme yapısı değiştirildi.
- Tarihler için başlangıç-bitiş aralığı seçilebielcek
- geri dönüldüğünde çıkan hatalar düzeltildi
- filtrede date olan alanlar için başlangıç-bitiş seçimi eklendi
- axios serializer eklendi. array ile verilen parametrelerde hata çıkıyordu
2025-10-24 10:24:05 +03:00
f31bd6ba9e Listablecontent 2025-10-17 09:48:18 +03:00
5fe3a36893 signalrService.ts 2025-10-06 11:58:09 +03:00
4dae2824fb piyangoDosyaKapamaStore.ts 2025-10-06 11:57:57 +03:00
6d4d0c8be9 PanelPiyangoDosyaKapamaIkramiye.vue 2025-10-06 11:57:36 +03:00
bf047e36f3 - Pasword alanları için şifreyi görüntüle-gizle özelliği 2025-10-06 11:29:39 +03:00
67 changed files with 2321 additions and 1073 deletions

23
Configs.ts Normal file
View File

@ -0,0 +1,23 @@
// build olurken bazı klasorlerin ayri script olarak kaydedilmesi
export const TEMPLATE_CHUNK_GROUPS: Record<string, (RegExp | string)[]> = {
store: [/\/src\/stores\//],
//lott: [/\/src\/module\/cekilisler\//],
//user: [/\/src\/module\/kullanicilar\//],
//cust: [/\/src\/module\/uyeler\//],
//acc: [/\/src\/module\/muhasebe\//],
//site: [/\/src\/module\/site-yonetimi\//],
//aut: [/\/src\/module\/auth\//]
}
// id -> group_name
export function SetTemplateGroup(id: string): string | undefined {
const cleanId = id.split('?')[0]
for (const [group, pats] of Object.entries(TEMPLATE_CHUNK_GROUPS)) {
if (
pats.some((p) => (typeof p === 'string' ? cleanId.includes(p) : p.test(cleanId)))
) {
return group
}
}
return undefined
}

View File

@ -21,8 +21,6 @@
"jquery": "^3.7.1", "jquery": "^3.7.1",
"parchment": "^3.0.0", "parchment": "^3.0.0",
"pinia": "^2.1.7", "pinia": "^2.1.7",
"quill": "^2.0.3",
"quill-image-resize-module": "^3.0.0",
"summernote": "^0.9.1", "summernote": "^0.9.1",
"uuid": "^11.1.0", "uuid": "^11.1.0",
"vue": "^3.4.29", "vue": "^3.4.29",

Binary file not shown.

Binary file not shown.

17
public/web.config Normal file
View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Handle History Mode and custom 404/500" stopProcessing="true">
<match url="(.*)" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="/" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>

166
sql_query_updated.sql Normal file
View File

@ -0,0 +1,166 @@
SELECT c.Id, c.PiyangoId, c.Baslik, ISNULL(c.CreateDate, '0001-01-01') AS OlusturmaTarihi, MIN(ISNULL(cb.BaslangicTarihi, '0001-01-01')) AS BaslangicTarihi, MIN(ISNULL(cb.BitisTarihi, '0001-01-01')) AS BitisTarihi,
/* DÜZENLEYEN (mevcut)*/ COALESCE (NULLIF (d .DernekUnvan, ''), NULLIF (d .GercekTicariUnvan, ''), NULLIF (d .kamuUnvan, ''), NULLIF (d .SirketUnvan, ''), NULLIF (d .TuzelUnvan, ''), LTRIM(RTRIM(COALESCE (d .GercekAdi,
'') + ' ' + COALESCE (d .GercekSoyadi, ''))), iblist.IrtibatAdSoyad, 'Bilinmiyor') AS Duzenleyen, ISNULL(d .Id, 0) AS DuzenleyenId,
/* MÜDÜRLÜK (yeni - 2. başlık)*/
CASE
WHEN odlast.Mudurluk = 1 THEN '1 No''lu Özel Çekilişler İzin ve Takip Şubesi Müdürlüğü'
WHEN odlast.Mudurluk = 2 THEN '2 No''lu Özel Çekilişler İzin ve Takip Şubesi Müdürlüğü'
WHEN odlast.Mudurluk = 3 THEN '3 No''lu Özel Çekilişler İzin ve Takip Şubesi Müdürlüğü'
ELSE ISNULL(birim.BirimAdi, '')
END AS Mudurluk,
MIN(cy.Deger) AS CekilisYontemi, MIN(cb.CekilisYontemiId) AS CekilisYontemiId, MIN(cb.KatilimciListesiTeslimYontemiId) AS KatilimciListesiTeslimYontemiId, MIN(klt.Deger) AS KatilimciListesiTeslimYontemi, ik.Ikramiyeler,
ISNULL(odlast.OnayDurumuIslemTipiId, 0) AS DurumId, ISNULL(odlast.IslemTipi, 'Yeni Piyango') AS Durum, MIN(ISNULL(cb.CekilisTarihi, '0001-01-01')) AS CekilisTarihi, ap.AmacAdi AS piyangoamac,
c.amacpiyangoId AS piyangoAmacId, ISNULL(oc.OnayVerecekKisi1Id, 0) AS OnayVerecekKisi1Id, ISNULL(oc.OnayVerecekKisi2Id, 0) AS OnayVerecekKisi2Id, ISNULL(oc.OnayVerecekKisi3Id, 0) AS OnayVerecekKisi3Id,
c.izinBedelNo, c.BasvuruBedelNo, c.izinBedeliDurum, c.basvuruBedeliDurum, c.baglisirketId, /* Atanmis (mevcut)*/ CASE WHEN ISNULL(oc.OnayVerecekKisi1Id, 0) > 0 OR
ISNULL(oc.OnayVerecekKisi2Id, 0) > 0 OR
ISNULL(oc.OnayVerecekKisi3Id, 0) > 0 THEN CAST(1 AS BIT) ELSE CAST(0 AS BIT) END AS Atanmis, ISNULL(atananlar.AlananIsimler, '') AS Atananlar, /* ARACI FİRMA (yeni - 5. başlık)*/ CASE WHEN EXISTS
(SELECT 1
FROM AspNetUserRoles ur INNER JOIN
AspNetRoles r ON ur.RoleId = r.Id
WHERE ur.UserId = d .ParentUserId AND r.Name = 'AraciFirma') THEN COALESCE (NULLIF (parentUser.DernekUnvan, ''), NULLIF (parentUser.GercekTicariUnvan, ''), NULLIF (parentUser.kamuUnvan, ''),
NULLIF (parentUser.SirketUnvan, ''), NULLIF (parentUser.TuzelUnvan, ''), LTRIM(RTRIM(COALESCE (parentUser.GercekAdi, '') + ' ' + COALESCE (parentUser.GercekSoyadi, ''))), '') ELSE '' END AS AraciFirma,
/* İZİN TARİHİ (yeni - 7. başlık)*/ odlast.IzinTarihi AS IzinTarihi, /* İZİN SAYISI (yeni - 8. başlık)*/ odlast.IzinSayisi AS IzinSayisi,
/* ÇEKİLİŞ GÖREVLİSİ (yeni - 12. başlık)*/
CASE
WHEN odlast.CekilisGorevlisi = 1 THEN 'Antalya Şube Müdürlüğü'
WHEN odlast.CekilisGorevlisi = 2 THEN 'Gaziantep Şube Müdürlüğü'
WHEN odlast.CekilisGorevlisi = 3 THEN 'Aksaray Şube Müdürlüğü'
WHEN odlast.CekilisGorevlisi = 4 THEN 'Kadıköy Şube Müdürlüğü'
WHEN odlast.CekilisGorevlisi = 5 THEN 'Karşıyaka Şube Müdürlüğü'
WHEN odlast.CekilisGorevlisi = 6 THEN 'Muğla Şube Müdürlüğü'
WHEN odlast.CekilisGorevlisi = 7 THEN 'Trabzon Şube Müdürlüğü'
WHEN odlast.CekilisGorevlisi = 8 THEN 'Noter'
WHEN odlast.CekilisGorevlisi = 9 THEN 'Başkanlık Personeli'
ELSE COALESCE (LTRIM(RTRIM(COALESCE (personel.GercekAdi, '') + ' ' + COALESCE (personel.GercekSoyadi, ''))), LTRIM(RTRIM(COALESCE (birimSefi.GercekAdi, '') + ' ' + COALESCE (birimSefi.GercekSoyadi, ''))), '')
END AS CekilisGorevlisi,
/* GAZETE İLAN TARİHİ (yeni - 13. başlık)*/ MIN(cb.ilantarihi) AS GazeteIlanTarihi, /* GAZETE ADI (yeni - 14. başlık)*/ MIN(cb.ilanEdilecekGazete)
AS GazeteAdi, /* KDV Oranı = 0.20 (sabit)*/ CASE WHEN ikramiyeTutar.ToplamTutar IS NOT NULL AND izinBedelOrani.Oran IS NOT NULL THEN CAST((ikramiyeTutar.ToplamTutar * izinBedelOrani.Oran / 100.0)
* 1.20 AS DECIMAL(18, 2)) ELSE NULL END AS IzinBedeliTutari, /* İKRAMİYE TUTARI (yeni - 16. başlık)*/ ISNULL(ikramiyeTutar.ToplamTutar, 0) AS IkramiyeTutari,
/* TEMİNAT TARİHİ (yeni - 17. başlık)*/ ts .TeminantDate AS TeminatTarihi, /* TEMİNAT SAYISI (yeni - 18. başlık)*/ ts .TeminantNo AS TeminatSayisi, /* TEMİNAT BANKASI (yeni - 19. başlık)*/ ts .BankName AS TeminatBankasi,
/* TEMİNAT TUTARI (yeni - 20. başlık)*/ ts .Amount AS TeminatTutari, /* T. PARA CİNSİ (yeni - 21. başlık)*/ ISNULL(paraBirimi.ParaBirimiSembol, '') AS ParaBirimiSembol,
/* T. İADE TARİHİ (yeni - 22. başlık)*/ ts .RefundDate AS TeminatIadeTarihi, /* T. İADE SAYISI (yeni - 23. başlık)*/ ts .RefundCount AS TeminatIadeSayisi
FROM Cekilisler c LEFT JOIN
CekilisBilgiler cb ON cb.CekilisId = c.Id LEFT JOIN
AspNetUsers d ON d .Id = c.DuzenleyenId LEFT JOIN
Birimler birim ON birim.Id = d .BirimId /* MÜDÜRLÜK için*/ LEFT JOIN
AspNetUsers parentUser ON parentUser.Id = d .ParentUserId /* ARACI FİRMA için*/ LEFT JOIN
AspNetUsers personel ON personel.Id = c.PersonelId /* ÇEKİLİŞ GÖREVLİSİ için*/ LEFT JOIN
AspNetUsers birimSefi ON birimSefi.Id = c.BirimSefiId /* ÇEKİLİŞ GÖREVLİSİ için*/ LEFT JOIN
PiyangoAmacs ap ON ap.Id = c.amacpiyangoId LEFT JOIN
OnayCekilisler oc ON oc.CekilisId = c.Id LEFT JOIN
CekilisYontemleri cy ON cb.CekilisYontemiId = cy.Id LEFT JOIN
KatilimciListesiTeslimYontemleri klt ON cb.KatilimciListesiTeslimYontemiId = klt.Id /* APPLY ile son OnayDurumu (İZİN TARİHİ, İZİN SAYISI, MÜDÜRLÜK ve ÇEKİLİŞ GÖREVLİSİ dahil)*/ OUTER APPLY
(SELECT TOP 1 od.OnayDurumuIslemTipiId, od.IslemTipi, od.IzinTarihi, od.IzinSayisi, od.Mudurluk, od.CekilisGorevlisi
FROM OnayCekilisler oc2 INNER JOIN
OnayDurumlari od ON oc2.Id = od.OnayCekilisId
WHERE oc2.CekilisId = c.Id
ORDER BY od.Tarih DESC) odlast /* APPLY ile ikramiyeler string*/ OUTER APPLY
(SELECT STUFF
((SELECT ', ' + i2.Marka + ' ' + i2.Model
FROM Ikramiyeler i2
WHERE i2.CekilisId = c.Id FOR XML PATH(''), TYPE ).value('.', 'NVARCHAR(MAX)'), 1, 2, '')) ik(Ikramiyeler) /* APPLY ile ikramiye tutarı toplamı*/ OUTER APPLY
(SELECT SUM(i3.BirimFiyat * i3.AsilTalihliAdedi) AS ToplamTutar
FROM Ikramiyeler i3
WHERE i3.CekilisId = c.Id) ikramiyeTutar /* APPLY ile aktif izin bedel oranı (ilk aktif oran)*/ OUTER APPLY
(SELECT TOP 1 ibo.Oran
FROM IzinBedelOranlari ibo
WHERE ibo.Aktif = 1
ORDER BY ibo.Id) izinBedelOrani /* APPLY ile para birimi sembolü (ilk ikramiyenin para birimi)*/ OUTER APPLY
(SELECT TOP 1 pb.ParaBirimiSembol
FROM Ikramiyeler i4 LEFT JOIN
ParaBirimleri pb ON pb.Id = i4.ParaBirimiId
WHERE i4.CekilisId = c.Id AND pb.ParaBirimiSembol IS NOT NULL
ORDER BY i4.Id) paraBirimi /* APPLY ile irtibat bilgileri string*/ OUTER APPLY
(SELECT STUFF
((SELECT ', ' + ib2.AdSoyad
FROM IrtibatBilgiler ib2
WHERE ib2.CekilisId = c.Id FOR XML PATH(''), TYPE ).value('.', 'NVARCHAR(MAX)'), 1, 2, '')) iblist(IrtibatAdSoyad) /* APPLY ile atanan kullanıcı isimleri*/ OUTER APPLY
(SELECT STUFF
((SELECT ', ' + u.GercekAdi + ' ' + u.GercekSoyadi
FROM AspNetUsers u
WHERE u.Id IN (ISNULL(oc.OnayVerecekKisi1Id, 0), ISNULL(oc.OnayVerecekKisi2Id, 0), ISNULL(oc.OnayVerecekKisi3Id, 0)) FOR XML PATH(''), TYPE ).value('.',
'NVARCHAR(MAX)'), 1, 2, '')) atananlar(AlananIsimler) /* APPLY ile teminat bilgileri (son teminat kaydı)*/ OUTER APPLY
(SELECT TOP 1 ts2.TeminantDate, ts2.TeminantNo, ts2.BankName, ts2.Amount, ts2.RefundDate, ts2.RefundCount
FROM TeminantStates ts2
WHERE ts2.CekilisId = c.Id
ORDER BY ts2.Id DESC) ts
GROUP BY c.Id, c.PiyangoId, c.Baslik, c.CreateDate, d .DernekUnvan, d .GercekTicariUnvan, d .kamuUnvan, d .SirketUnvan, d .TuzelUnvan, d .GercekAdi, d .GercekSoyadi, d .Id, d .ParentUserId,
birim.BirimAdi, ap.AmacAdi, c.amacpiyangoId, oc.OnayVerecekKisi1Id, oc.OnayVerecekKisi2Id, oc.OnayVerecekKisi3Id, c.izinBedelNo, c.BasvuruBedelNo, c.izinBedeliDurum,
c.basvuruBedeliDurum, c.baglisirketId, ik.Ikramiyeler, iblist.IrtibatAdSoyad, odlast.OnayDurumuIslemTipiId, odlast.IslemTipi, odlast.IzinTarihi, odlast.IzinSayisi,
atananlar.AlananIsimler, personel.GercekAdi, personel.GercekSoyadi, birimSefi.GercekAdi, birimSefi.GercekSoyadi, parentUser.DernekUnvan, parentUser.GercekTicariUnvan,
parentUser.kamuUnvan, parentUser.SirketUnvan, parentUser.TuzelUnvan, parentUser.GercekAdi, parentUser.GercekSoyadi, ikramiyeTutar.ToplamTutar, izinBedelOrani.Oran,
paraBirimi.ParaBirimiSembol, ts .TeminantDate, ts .TeminantNo, ts .BankName, ts .Amount, ts .RefundDate, ts .RefundCount, odlast.Mudurluk, odlast.CekilisGorevlisi;

View File

@ -251,4 +251,14 @@
d="M14.3272 17.4867H5.66513C5.33609 17.4867 5.07048 17.7574 5.07048 18.0928C5.07048 18.4281 5.33609 18.6989 5.66513 18.6989H14.3232C14.6522 18.6989 14.9179 18.4281 14.9179 18.0928C14.9179 17.7574 14.6522 17.4867 14.3232 17.4867H14.3272Z" d="M14.3272 17.4867H5.66513C5.33609 17.4867 5.07048 17.7574 5.07048 18.0928C5.07048 18.4281 5.33609 18.6989 5.66513 18.6989H14.3232C14.6522 18.6989 14.9179 18.4281 14.9179 18.0928C14.9179 17.7574 14.6522 17.4867 14.3232 17.4867H14.3272Z"
/> />
</symbol> </symbol>
<symbol id="eyeclose" viewBox="0 0 59 22">
<path
d="M56.61,11.89l2.55-1.57L52.83.03l-2.55,1.57h0s-11.76,7.25-11.76,7.25c-.94.58-1.91,1.05-2.91,1.43l-2.61.74v.02c-2.43.5-4.94.45-7.36-.14l-1.2-.34c-1.28-.41-2.53-.98-3.72-1.71L7.68.82h0s-1.35-.82-1.35-.82L0,10.28l2.55,1.57,4.76-7.73,6.18,3.81-4.79,7.77,2.55,1.57,4.79-7.77,3.09,1.9c1.15.71,2.35,1.28,3.58,1.74l-2.48,8.78,2.89.82,2.48-8.76c1.32.27,2.66.41,4.01.41,1.41,0,2.82-.16,4.2-.46l2.46,8.7,2.89-.82-2.48-8.75c1.16-.44,2.3-.99,3.39-1.66l3.12-1.92,4.79,7.77,2.55-1.57-4.79-7.77,6.08-3.75,4.75,7.72Z" />
</symbol>
<symbol id="eye" viewBox="0 0 51 24">
<path
d="M25.59,24.58c-3.62,0-7.24-.99-10.47-2.98L0,12.29,15.11,2.98c6.46-3.98,14.48-3.98,20.94,0l15.11,9.31-15.11,9.31c-3.23,1.99-6.85,2.98-10.47,2.98ZM5.72,12.29l10.97,6.75c5.49,3.38,12.31,3.38,17.8,0l10.97-6.75-10.97-6.75c-5.49-3.38-12.31-3.38-17.8,0l-10.97,6.75Z" />
<path
d="M25.59,21.71c-5.19,0-9.42-4.23-9.42-9.42S20.39,2.87,25.59,2.87s9.42,4.23,9.42,9.42-4.23,9.42-9.42,9.42ZM25.59,5.87c-3.54,0-6.42,2.88-6.42,6.42s2.88,6.42,6.42,6.42,6.42-2.88,6.42-6.42-2.88-6.42-6.42-6.42Z" />
</symbol>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 44 KiB

View File

@ -454,6 +454,7 @@ label {
flex-wrap: wrap; flex-wrap: wrap;
width: 100%; width: 100%;
padding: 2px; padding: 2px;
position: relative;
} }
label>span { label>span {
@ -726,6 +727,99 @@ svg {
background-color: #f1f1f1; background-color: #f1f1f1;
} }
/* İşlem durumu badge stilleri - basit ve kompakt */
.islem-status-badge {
display: inline-block;
padding: 4px 10px;
color: #fff;
border-radius: 12px;
font-size: 0.875em;
font-weight: 500;
white-space: nowrap;
line-height: 1.4;
}
.form-select-list-item .islem-status-badge {
display: inline-block;
width: auto;
}
.form-select-activator .islem-status-badge {
display: inline-block;
width: auto;
}
/* Her durum için benzersiz canlı renkler */
.islem-status-coral {
background: #e74c3c;
}
.islem-status-amber {
background: #f39c12;
}
.islem-status-sky {
background: #3498db;
}
.islem-status-rose {
background: #e91e63;
}
.islem-status-pink {
background: #ec407a;
}
.islem-status-slate {
background: #607d8b;
color: #fff;
}
.islem-status-emerald {
background: #27ae60;
}
.islem-status-red {
background: #c0392b;
}
.islem-status-salmon {
background: #e67e22;
}
.islem-status-mint {
background: #2ecc71;
}
.islem-status-peach {
background: #ff9800;
}
.islem-status-yellow {
background: #f1c40f;
color: #333;
}
.islem-status-teal {
background: #1abc9c;
}
.islem-status-cyan {
background: #00bcd4;
}
.islem-status-orange {
background: #ff5722;
}
.islem-status-blue {
background: #2196f3;
}
.islem-status-gold {
background: #ffc107;
color: #333;
}
.islem-status-lavender {
background: #9c27b0;
}
.islem-status-violet {
background: #673ab7;
}
.islem-status-crimson {
background: #d32f2f;
}
.islem-status-indigo {
background: #3f51b5;
}
.islem-status-default {
background: #757575;
}
/* login */ /* login */
.login-w { .login-w {
min-width: 100%; min-width: 100%;
@ -2161,7 +2255,7 @@ section {
} }
.panel-wrapper { .panel-wrapper {
max-width: 480px; max-width: 600px;
} }
.panel-wrapper.panel-wide { .panel-wrapper.panel-wide {
@ -2174,7 +2268,7 @@ section {
} }
.panel-wrapper.panel-right.showme { .panel-wrapper.panel-right.showme {
left: calc(100% - 480px); left: calc(100% - 600px);
} }
.panel-wrapper.panel-right.panel-wide.showme { .panel-wrapper.panel-right.panel-wide.showme {

View File

@ -67,7 +67,7 @@
const router = useRouter() const router = useRouter()
const props = defineProps<{ const props = defineProps<{
tableData: Record<string, any> tableData: Record<string, any>[]
lineFunction?: Function lineFunction?: Function
title?: string title?: string
listText?: string listText?: string
@ -97,16 +97,36 @@
} }
const goToListWithFilter = () => { const goToListWithFilter = () => {
try {
const query: Record<string, any> = {} const query: Record<string, any> = {}
// Filtre parametrelerini query'ye ekle // Filtre parametrelerini query'ye ekle (Filters[...] formatına dönüştür)
if (props.filterParams) { if (props.filterParams && typeof props.filterParams === 'object') {
Object.assign(query, props.filterParams) Object.keys(props.filterParams).forEach((key) => {
const value = props.filterParams![key]
if (value !== undefined && value !== null && value !== '') {
// Değer zaten operatör içeriyorsa olduğu gibi kullan, yoksa '=' ekle
let filterValue = String(value)
// Eğer değer zaten operatör içermiyorsa '=' ekle
if (!filterValue.match(/^[<>=]/)) {
filterValue = '=' + filterValue
}
// Query parametresine string olarak ekle (Vue Router array'leri yanlış serialize ediyor)
query[`Filters[${key}]`] = filterValue
}
})
} }
router.push({ router.push({
path: '/piyangolar/piyango-listesi', path: '/piyangolar/piyango-listesi',
query: query query: query
}) })
} catch (error) {
console.error('goToListWithFilter hatası:', error)
// Hata durumunda filtre olmadan yönlendir
router.push({
path: '/piyangolar/piyango-listesi'
})
}
} }
</script> </script>

View File

@ -71,6 +71,10 @@
if (Number(pageNumber.value) < totalPage()) pageNumber.value++ if (Number(pageNumber.value) < totalPage()) pageNumber.value++
} }
localPagination.value.pageNumber = pageNumber.value localPagination.value.pageNumber = pageNumber.value
IfRouteUsing()
emit('update:pagination', localPagination.value)
}
const IfRouteUsing = () => {
if (props.isUseRoute) { if (props.isUseRoute) {
router.push({ router.push({
query: { query: {
@ -79,16 +83,13 @@
} }
}) })
} }
emit('update:pagination', localPagination.value)
} }
const InputPageControl = (e: Event) => { const InputPageControl = (e: Event) => {
if (Number((e.target as HTMLInputElement).value) < 1) if (Number((e.target as HTMLInputElement).value) < 1)
(e.target as HTMLInputElement).value = '1' (e.target as HTMLInputElement).value = '1'
if (Number((e.target as HTMLInputElement).value) > totalPage()) if (Number((e.target as HTMLInputElement).value) > totalPage())
(e.target as HTMLInputElement).value = String(totalPage()) (e.target as HTMLInputElement).value = String(totalPage())
pageNumber.value = Number((e.target as HTMLInputElement).value) pageNumber.value = Number((e.target as HTMLInputElement).value)
if ((e as KeyboardEvent).key === 'Enter') getPage() if ((e as KeyboardEvent).key === 'Enter') getPage()
} }
const PageNumberFocus = (e: Event) => { const PageNumberFocus = (e: Event) => {
@ -96,6 +97,7 @@
} }
const getPage = () => { const getPage = () => {
localPagination.value.pageNumber = pageNumber.value localPagination.value.pageNumber = pageNumber.value
IfRouteUsing()
emit('update:pagination', localPagination.value) emit('update:pagination', localPagination.value)
} }
const SetPageNumber = () => { const SetPageNumber = () => {
@ -104,6 +106,8 @@
localPagination.value.pageNumber = pageNumber.value = Number( localPagination.value.pageNumber = pageNumber.value = Number(
route.query.pageNumber route.query.pageNumber
) )
} else {
localPagination.value.pageNumber = pageNumber.value = 1
} }
} }
} }

View File

@ -11,7 +11,7 @@
</span> </span>
<input <input
:value="modelValue" :value="modelValue"
:type="type" :type="inputType"
:placeholder="placeholder" :placeholder="placeholder"
:disabled="disabled" :disabled="disabled"
@input="OnInput" @input="OnInput"
@ -22,12 +22,24 @@
@keyup="OnKeyUp" @keyup="OnKeyUp"
:class="[ :class="[
invalidText !== undefined && invalidText !== '' ? 'invalid' : '', invalidText !== undefined && invalidText !== '' ? 'invalid' : '',
iclass || '' iclass || '',
isPasswordVisible || props.type === 'password' ? 'password-visible' : ''
]" ]"
:min="min" :min="min"
:max="max" :max="max"
:minlength="minlength" :minlength="minlength"
:maxlength="maxlength" /> :maxlength="maxlength" />
<i
class="ico-c ico-password-visible"
v-if="props.type === 'password'"
@click="PasswordVisibleToggle">
<svg>
<use
:href="
'/src/assets/images/icons.svg#' + (isPasswordVisible ? 'eye' : 'eyeclose')
"></use>
</svg>
</i>
<span <span
class="form-item-alert" class="form-item-alert"
v-if="InvalidMessages.length > 0 && InvalidMessages !== ''"> v-if="InvalidMessages.length > 0 && InvalidMessages !== ''">
@ -82,9 +94,18 @@
'keydown', 'keydown',
'keyup' 'keyup'
]) ])
const localValue = ref<any>() const isPasswordVisible = ref<boolean>(false)
const InvalidMessageText = reactive<Record<string, any>>({}) const InvalidMessageText = reactive<Record<string, any>>({})
const inputType = computed(() => {
if (props.type !== 'password') {
return props.type
} else {
if (isPasswordVisible.value) return 'text'
else return 'password'
}
})
const InvalidMessages = computed<string>(() => { const InvalidMessages = computed<string>(() => {
let text = '' let text = ''
Object.keys(InvalidMessageText).forEach((k: string, i: number) => { Object.keys(InvalidMessageText).forEach((k: string, i: number) => {
@ -138,7 +159,9 @@
emit('update:modelValue', (e.target as HTMLInputElement).value) emit('update:modelValue', (e.target as HTMLInputElement).value)
emit('keyup', e) emit('keyup', e)
} }
const PasswordVisibleToggle = () => {
if (props.type === 'password') isPasswordVisible.value = !isPasswordVisible.value
}
watch( watch(
() => props.invalidText, () => props.invalidText,
() => { () => {
@ -151,3 +174,16 @@
} }
) )
</script> </script>
<style scoped>
.ico-password-visible {
position: absolute;
right: 8px;
top: 32px;
min-width: 32px;
min-height: 32px;
cursor: pointer;
}
.password-visible {
padding: 8px 40px 8px 8px;
}
</style>

View File

@ -1,210 +0,0 @@
<template>
<div :class="['form-item', half ? 'form-item-half' : '', elclass || '']">
<span class="form-item-title" v-if="title !== undefined && title !== ''">
{{ title }}
</span>
<slot name="input">
<label>
<span v-if="label !== undefined && label !== ''">
{{ label }}
<i v-if="required" class="form-item-alert">*</i>
</span>
<div :ref="'quillContainer' + rnd"></div>
<span
class="form-item-alert"
v-if="InvalidMessages.length > 0 && InvalidMessages !== ''">
{{ InvalidMessages }}
</span>
<span
class="form-item-description"
v-if="description !== undefined && description !== ''">
{{ description }}
</span>
</label>
</slot>
</div>
</template>
<script setup lang="ts">
import { ref, reactive, computed, onMounted, useTemplateRef, watch } from 'vue'
import Quill from 'quill'
import 'quill/dist/quill.snow.css'
declare const window: any
window.Quill = Quill
export interface Props {
label?: string
disabled?: boolean
modelValue: string
half?: boolean
title?: string
invalidText?: string
description?: string
placeholder?: string
required?: boolean
maxlength?: string
minlength?: string
iclass?: string
elclass?: string
modelKey?: string
}
const props = withDefaults(defineProps<Props>(), {
disabled: false,
half: false,
required: false,
placeholder: ''
})
const emit = defineEmits(['update:modelValue', 'change', 'text-change'])
const rnd = ref<number>(Number(Math.random() * 10000000))
const toolbar = ref<any[]>([
[{ font: [] }, { size: [] }],
['bold', 'italic', 'underline', 'strike'],
[{ color: [] }, { background: [] }],
[{ script: 'super' }, { script: 'sub' }],
[{ header: '1' }, { header: '2' }, 'blockquote'],
[{ list: 'ordered' }, { list: 'bullet' }, { indent: '-1' }, { indent: '+1' }],
[{ align: [] }],
['link', 'image', 'video'],
['clean']
])
const options = reactive<Record<string, any>>({
theme: 'snow',
modules: {
toolbar: toolbar.value,
imageResize: {
modules: ['Resize', 'DisplaySize', 'Toolbar']
}
},
placeholder: props.placeholder,
readOnly: false,
debug: false
})
const QuillImageResize = ref<any>()
const editor = useTemplateRef<any>('quillContainer' + rnd.value)
const quill = ref<Quill | null>(null)
const localValue = ref<string>(props.modelValue)
const InvalidMessageText = ref<Record<string, any>>({})
const InvalidMessages = computed(() => {
let text = ''
Object.keys(InvalidMessageText.value).forEach((k: string, i: number) => {
text += InvalidMessageText.value[k] + ', '
})
return text
})
const OnTextChange = (e: any) => {
if (props.minlength !== undefined) {
if (localValue.value.length < Number(props.minlength)) {
InvalidMessageText.value.minlength = `Girdiğiniz bilgi en az ${props.minlength} karakter uzunluğunda olmalı`
} else {
delete InvalidMessageText.value.minlength
}
}
if (quill.value !== null) {
localValue.value = quill.value!.container.querySelector('.ql-editor')!.innerHTML
}
emit('update:modelValue', localValue.value)
emit('change', e)
}
const InitializeEditor = async () => {
await setupQuillEditor()
SetContent()
RegisterEditorEventListeners()
}
const SetContent = () => {
if (props.modelValue) quill.value!.root.innerHTML = props.modelValue
}
const setupQuillEditor = async () => {
//let Parchment = Quill.import('parchment')
window.Quill.imports.parchment.Attributor.Style =
window.Quill.imports.parchment.StyleAttributor
//@ts-ignore
QuillImageResize.value = await import('quill-image-resize-module')
quill.value = new Quill(editor.value, options) as Quill
;(quill.value!.getModule('toolbar') as Record<
string,
any
>)!.container.addEventListener('mousedown', (e: Event) => {
e.preventDefault()
})
;(quill.value!.getModule('toolbar') as Record<
string,
any
>)!.container.addEventListener('click', (e: Event) => {
if ((e.target as HTMLElement).className !== 'ql-image') e.preventDefault()
})
}
const RegisterEditorEventListeners = () => {
quill.value!.on('text-change', OnTextChange)
quill.value!.on('editor-change', OnTextChange)
//image resize imaja tıklandığını anlamıyor.
quill.value!.root.addEventListener('mouseover', OnMouseOver, false)
ListenForEditorEvent('text-change')
}
const ListenForEditorEvent = (type: any) => {
quill.value!.on(type, (...args) => {
emit(type, ...args)
})
}
const OnMouseOver = (e: Event) => {
if (
(e.target as HTMLElement)!.firstChild &&
((e.target as HTMLElement)!.firstChild as HTMLElement)!.tagName &&
((e.target as HTMLElement)!.firstChild as HTMLElement)!.tagName.toUpperCase() ===
'IMG'
) {
;(e.target as HTMLElement)!.classList.add('remove-click-p')
;((e.target as HTMLElement)!.firstChild as HTMLElement)!.classList.add(
'add-click-img'
)
}
}
onMounted(async () => {
InitializeEditor()
})
watch(
() => props.invalidText,
() => {
if (props.invalidText !== undefined && props.invalidText !== '') {
InvalidMessageText.value.invalid = props.invalidText
} else {
delete InvalidMessageText.value.invalid
}
}
)
</script>
<style>
.ql-toolbar {
width: 100%;
}
.ql-container {
width: 100%;
min-height: 120px;
}
.remove-click-p {
pointer-events: none;
}
.add-click-img {
pointer-events: all;
}
</style>

View File

@ -61,7 +61,7 @@
@click="exportPanel = !exportPanel" @click="exportPanel = !exportPanel"
icon="export" /> icon="export" />
<icon-button <icon-button
v-if="filterable()" v-if="filterable"
classList="ico-section ico-section-header-btn" classList="ico-section ico-section-header-btn"
@click="OpenFilterPanel" @click="OpenFilterPanel"
icon="filter" /> icon="filter" />
@ -85,7 +85,7 @@
page === 'list' ? 'section-content section-inner' : '', page === 'list' ? 'section-content section-inner' : '',
page === 'form' ? 'form-part-content' : '' page === 'form' ? 'form-part-content' : ''
]"> ]">
<div class="list-filter-wrapper" v-if="filters() || searched"> <div class="list-filter-wrapper" v-if="haveFilter || searched">
<h4>Filtreler ve Arama</h4> <h4>Filtreler ve Arama</h4>
<div class="list-filter-content"> <div class="list-filter-content">
<template v-if="localQuery !== ''"> <template v-if="localQuery !== ''">
@ -97,15 +97,22 @@
<span class="list-filter-close" @click="RemoveSearch"></span> <span class="list-filter-close" @click="RemoveSearch"></span>
</div> </div>
</template> </template>
<template v-for="(filter, k) in filterParams"> <template v-for="(filterA, index) in filterParams" :key="index">
<div class="list-filter-item" data-filter="durum-onaylanmis"> <template v-for="(filter, filterIndex) in filterA.values" :key="filterIndex">
<strong>{{ filter.title }}:</strong> <div
class="list-filter-item"
data-filter="durum-onaylanmis"
v-if="filterA.filter && (filter.text !== '' || filter.val !== '')">
<strong>{{ filterA.title }}:</strong>
<span> <span>
{{ filter.text || filter.val }} {{ filter.op === '=' ? '' : filter.op }} {{ filter.text || filter.val }} {{ filter.op === '=' ? '' : filter.op }}
</span> </span>
<span class="list-filter-close" @click="RemoveFilterKey(k as string)"></span> <span
class="list-filter-close"
@click="RemoveFilterKey(index, filterIndex)"></span>
</div> </div>
</template> </template>
</template>
</div> </div>
</div> </div>
<slot name="datatable"> <slot name="datatable">
@ -127,10 +134,7 @@
<panel-wrapper v-if="filterPanel" v-model="filterPanel" :panel-title="'Filtreleme'"> <panel-wrapper v-if="filterPanel" v-model="filterPanel" :panel-title="'Filtreleme'">
<template #panelContent> <template #panelContent>
<panel-filter <panel-filter :filterHead="tableHeader" :filterParams="localFilterParams" />
:filterHead="tableHeader"
v-model:filterParams="localFilterParams"
:isUseRoute="isUseRoute" />
</template> </template>
<template #footerButton> <template #footerButton>
<div class="button-c button-save" @click="FilterData">Filtrele</div> <div class="button-c button-save" @click="FilterData">Filtrele</div>
@ -260,11 +264,10 @@
const localTotalRecord = ref<string | number>(0) const localTotalRecord = ref<string | number>(0)
if (props.totalRecord !== undefined) localTotalRecord.value = props.totalRecord if (props.totalRecord !== undefined) localTotalRecord.value = props.totalRecord
const localFilterParams = ref<Record<string, any>>({}) const localFilterParams = ref<Record<string, any>[]>([])
const filterParams = reactive<Record<string, any>>({}) const filterParams = ref<Record<string, any>[]>([])
const OpenFilterPanel = () => { const OpenFilterPanel = () => {
Object.assign(localFilterParams.value, filterParams)
filterPanel.value = true filterPanel.value = true
} }
@ -273,28 +276,74 @@
if (dest[keys] === undefined) delete source[keys] if (dest[keys] === undefined) delete source[keys]
}) })
} }
const CreateFilterData = () => {
props.tableHeader.forEach((d: Record<string, any>, ind: number) => {
if (d.filter !== undefined) {
const filterKey = d.filter.filterId || d.name
const filterItem: Record<string, any> = {}
const firstVal: Record<string, any> = {}
const secondVal: Record<string, any> = {}
const FilterData = async () => { filterItem.title = d.title
Object.keys(filterParams).forEach((k) => { filterItem.type = d.filter.type
delete filterParams[k] filterItem.between = d.filter.between || false
filterItem.range = d.filter.range || false
filterItem.key = filterKey
filterItem.filter = false
filterItem.hIndex = ind
filterItem.values = []
const opKey =
d.filter.type === 'date'
? d.filter.between !== undefined && d.filter.between
? '>'
: '='
: '='
firstVal.op = opKey
firstVal.val = ''
firstVal.text = ''
filterItem.values.push(firstVal)
if (d.filter.between !== undefined && d.filter.between) {
secondVal.op = '<'
secondVal.val = ''
secondVal.text = ''
filterItem.values.push(secondVal)
}
localFilterParams.value.push(filterItem)
}
}) })
Object.assign(filterParams, localFilterParams.value) }
EqualObjects(filterParams, localFilterParams.value)
const AddParamsToObject = (obj: Record<string, any>) => {
filterParams.value.forEach((filter, index) => {
if (filter.filter) {
const key = 'Filters[' + filter.key + ']'
if (obj[key] === undefined) obj[key] = [] as string[]
filter.values.forEach((val: Record<string, any>, vIndex: number) => {
if (val.val !== '') {
;(obj[key] as string[]).push(val.op + val.val)
}
})
}
})
}
const ResetFilterQueries = async () => {
if (props.isUseRoute) { if (props.isUseRoute) {
Object.keys(route.query).forEach((k) => { const newQuery: Record<string, any> = {
if (k.includes('Filters[')) delete route.query[k]
})
const q = {
query: {
...route.query ...route.query
} }
} Object.keys(newQuery).forEach((q) => {
Object.keys(filterParams).forEach((f, k) => { if (q.includes('Filters[')) delete newQuery[q]
q.query['Filters[' + f + ']'] = filterParams[f].op + filterParams[f].val
}) })
router.push(q) await router.replace({ query: newQuery })
AddParamsToObject(newQuery)
await router.push({ query: newQuery })
} }
}
const FilterData = async () => {
filterParams.value = JSON.parse(JSON.stringify(localFilterParams.value))
ResetFilterQueries()
setTimeout(async () => { setTimeout(async () => {
await GetLocalData() await GetLocalData()
filterPanel.value = false filterPanel.value = false
@ -306,23 +355,32 @@
(props.addAction as Function)() (props.addAction as Function)()
} }
const filterable = () => { const filterable = computed(() =>
return props.tableHeader.filter((e) => e.hasOwnProperty('filter')).length > 0 props.tableHeader.some((obj: Record<string, any>) => obj.filter !== undefined)
} )
const filters = (): boolean => { const haveFilter = computed(() =>
return Object.keys(filterParams).length > 0 filterParams.value.some((obj: Record<string, any>) => obj.filter)
} )
const RemoveFilterKey = (k: string) => { const RemoveFilterKey = (index: number, fIndex: number) => {
delete localFilterParams.value[k]
delete filterParams[k]
const query: Record<string, any> = { ...route.query } const query: Record<string, any> = { ...route.query }
Object.keys(query).forEach((q) => {
if (q.includes(k)) delete query[q] filterParams.value[index].values[fIndex].val = ''
}) filterParams.value[index].values[fIndex].text = ''
router.push({ query: query })
GetLocalData() const allEmpty: boolean = filterParams.value[index].values.every(
(obj: Record<string, any>) => obj.val === ''
)
if (allEmpty) filterParams.value[index].filter = false
localFilterParams.value = JSON.parse(JSON.stringify(filterParams.value))
ResetFilterQueries()
setTimeout(async () => {
await GetLocalData()
filterPanel.value = false
}, 50)
} }
const RemoveSearch = () => { const RemoveSearch = () => {
localQuery.value = '' localQuery.value = ''
@ -396,52 +454,76 @@
const RouteFilterControl = () => { const RouteFilterControl = () => {
if (props.isUseRoute) { if (props.isUseRoute) {
const q = { ...route.query }
localFilterParams.value = {}
Object.keys(filterParams).forEach((k) => {
delete filterParams[k]
})
filterChanging.value = true filterChanging.value = true
if (Object.keys(route.query).length > 0) { if (Object.keys(route.query).length > 0) {
Object.keys(route.query).forEach((key) => { Object.keys(route.query).forEach((key) => {
if (key.includes('Filters[')) { if (key.includes('Filters[')) {
const newKey = key.match(/(?<=\[)[^\]]+(?=\])/)![0] const newKey = key.match(/(?<=\[)[^\]]+(?=\])/)![0]
filterParams[newKey] = {}
localFilterParams.value[newKey] = {}
filterParams[newKey].op = (route.query[key]! as string).charAt(0) localFilterParams.value.forEach((filter: Record<string, any>) => {
localFilterParams.value[newKey].op = (route.query[key]! as string).charAt(0) if (filter.key === newKey) {
if (!filter.filter) {
const isArray = Array.isArray(route.query[key])
if (isArray) {
;(route.query[key]! as string[]).forEach((val, ind) => {
filter.values[ind].op = (route.query[key]! as string[])[ind].charAt(
0
)
filter.values[ind].val = (route.query[key]! as string[])[ind].slice(
1
)
if (filter.type === 'select') {
const filterData = props.tableHeader[filter.hIndex].filter!.data
if (filterData && Array.isArray(filterData)) {
const forText = filterData.find(
(o: Record<string, any>) =>
String(
o[props.tableHeader[filter.hIndex].filter!.listVal]
) === String(filter.values[ind].val)
)
if (forText) {
filter.values[ind].text =
forText[props.tableHeader[filter.hIndex].filter!.listText]
} else {
filter.values[ind].text = filter.values[ind].val
}
} else {
filter.values[ind].text = filter.values[ind].val
}
}
})
} else {
filter.values[0].op = (route.query[key] as string).charAt(0)
filter.values[0].val = (route.query[key] as string).slice(1)
filterParams[newKey].val = (route.query[key]! as string).slice(1) if (filter.type === 'select') {
localFilterParams.value[newKey].val = (route.query[key]! as string).slice(1) const filterData = props.tableHeader[filter.hIndex].filter!.data
if (filterData && Array.isArray(filterData)) {
const forText = filterData.find(
(o: Record<string, any>) =>
String(o[props.tableHeader[filter.hIndex].filter!.listVal]) ===
String(filter.values[0].val)
)
if (forText) {
filter.values[0].text =
forText[props.tableHeader[filter.hIndex].filter!.listText]
} else {
filter.values[0].text = filter.values[0].val
}
} else {
filter.values[0].text = filter.values[0].val
}
}
}
filter.filter = true
}
} }
}) })
} }
})
props.tableHeader.forEach((head: Record<string, any>) => { filterParams.value = JSON.parse(JSON.stringify(localFilterParams.value))
if (head.filter !== undefined) {
Object.keys(filterParams).forEach((key) => {
if (
(head.filter.filterId !== undefined && key === head.filter.filterId) ||
key === head.name
) {
filterParams[key].title = head.title
localFilterParams.value[key].title = head.title
if (
head.filter.type === 'select' &&
head.filter.data !== undefined &&
head.filter.data.length > 0
) {
const forText = head.filter.data.find((o: Record<string, any>) => {
return String(o[head.filter.listVal]) === String(filterParams[key].val)
})
filterParams[key].text = forText[head.filter.listText]
localFilterParams.value[key].text = forText[head.filter.listText]
} }
}
})
}
})
nextTick(() => { nextTick(() => {
filterChanging.value = false filterChanging.value = false
}) })
@ -468,9 +550,28 @@
fileName = 'export.xlsx' fileName = 'export.xlsx'
} }
// Export için parametreleri hazırla
let exportParams: Record<string, any> = {}
// Sıralama parametrelerini ekle
if (localSort.value.sortColumn !== undefined) {
exportParams.sortColumn = localSort.value.sortColumn
if (localSort.value.sortOrder !== undefined && localSort.value.sortOrder !== '')
exportParams.sortOrder = localSort.value.sortOrder
}
// Arama parametresini ekle
if (localQuery.value !== '') {
exportParams.searchString = localQuery.value
}
// Filtre parametrelerini ekle
if (haveFilter.value) AddParamsToObject(exportParams)
// Axios ile dosya indirme - interceptor otomatik olarak token ekleyecek // Axios ile dosya indirme - interceptor otomatik olarak token ekleyecek
try { try {
const response = await axios.get(exportUrl, { const response = await axios.get(exportUrl, {
params: exportParams,
responseType: 'blob' responseType: 'blob'
}) })
@ -515,10 +616,8 @@
var filterparam: Record<string, any> = {} var filterparam: Record<string, any> = {}
if (filters()) { if (haveFilter.value) {
Object.keys(filterParams).forEach((f, k) => { AddParamsToObject(filterparam)
filterparam['Filters[' + f + ']'] = filterParams[f].op + filterParams[f].val
})
Object.assign(apiData.params, filterparam) Object.assign(apiData.params, filterparam)
} }
let dt = await dataStore.dataGet(props.apiList as string, apiData) let dt = await dataStore.dataGet(props.apiList as string, apiData)
@ -564,7 +663,7 @@
let el: HTMLInputElement = document.getElementById( let el: HTMLInputElement = document.getElementById(
'listsearch' + rnd.value 'listsearch' + rnd.value
) as HTMLInputElement ) as HTMLInputElement
el.focus el.focus()
el.select() el.select()
}, 50) }, 50)
} }
@ -591,41 +690,17 @@
mobileButtons.value = false mobileButtons.value = false
} }
// Filtre başlığını almak için yardımcı fonksiyon
const getFilterTitle = (key: string): string => {
const filterTitles: Record<string, string> = {
'durumId': 'Durum',
'piyangoAmacId': 'Piyango Amacı',
'cekilisYontemiId': 'Çekiliş Yöntemi'
}
return filterTitles[key] || key
}
onBeforeMount(() => { onBeforeMount(() => {
if (globalStore.screenWidth >= globalStore.breakPoints.tabletp) if (globalStore.screenWidth >= globalStore.breakPoints.tabletp)
mobileButtons.value = true mobileButtons.value = true
CreateFilterData()
RoutePageControl() RoutePageControl()
RouteSortControl() RouteSortControl()
RouteSearchControl() RouteSearchControl()
RouteFilterControl() RouteFilterControl()
// URL query parametrelerini kontrol et ve filtreleri uygula (ilk istekten önce)
if (Object.keys(route.query).length > 0) {
Object.keys(route.query).forEach(key => {
const value = route.query[key]
if (value && typeof value === 'string') {
// Filtre parametresini filterParams'a ekle
filterParams[key] = {
val: value,
op: '=',
title: getFilterTitle(key)
}
}
})
}
if (props.apiList !== undefined) GetLocalData() if (props.apiList !== undefined) GetLocalData()
window.addEventListener('resize', Resize) window.addEventListener('resize', Resize)
}) })
@ -655,14 +730,6 @@
} }
} }
) )
watch(
() => localPagination.value.pageNumber,
() => {
if (!pageNumberChanging.value) {
GetLocalData()
}
}
)
watch( watch(
() => props.refresh, () => props.refresh,
() => { () => {

View File

@ -1,107 +1,104 @@
<template> <template>
<template v-for="(filter, i) in filterHead"> <template v-for="(filter, i) in localFilterParams">
<template v-if="filter.filter !== undefined"> <template v-if="filter.type === 'datetime-local'">
<template v-if="filter.filter.type === 'datetime-local'">
<div class="panel-content-item"> <div class="panel-content-item">
<form-date <form-date
v-model="localFilterData[filter.name]" v-model="filter.values[0].val"
:label="filter.title" :label="
@change="UpdateFilter(filter)" /> filter.title +
(filter.between !== undefined && filter.between ? ' (Başlangıç)' : '')
"
@change="UpdateFilter(filter, 0)" />
<form-select <form-select
v-if="filter.filter.range !== undefined && filter.filter.range" v-if="filter.range !== undefined && filter.range"
:listData="filterOperator" :listData="filterOperator"
v-model="localFilterData[filter.name + 'op']" v-model="filter.values[0].op"
@change="UpdateFilter(filter)" /> @change="UpdateFilter(filter, 0)"
label="Operator" />
<form-date
v-if="filter.between !== undefined && filter.between"
v-model="filter.values[1].val"
:label="
filter.title +
(filter.between !== undefined && filter.between ? ' (Bitiş)' : '')
"
@change="UpdateFilter(filter, 1)" />
</div> </div>
</template> </template>
<template v-if="filter.filter.type === 'date'"> <template v-if="filter.type === 'date'">
<div class="panel-content-item"> <div class="panel-content-item">
<form-date <form-date
type="date" type="date"
v-model="localFilterData[filter.name]" v-model="filter.values[0].val"
:label="filter.title" :label="
@change="UpdateFilter(filter)" /> filter.title +
(filter.between !== undefined && filter.between ? ' (Başlangıç)' : '')
"
@change="UpdateFilter(filter, 0)" />
<form-select <form-select
v-if="filter.filter.range !== undefined && filter.filter.range" v-if="filter.range !== undefined && filter.range"
:listData="filterOperator" :listData="filterOperator"
v-model="localFilterData[filter.name + 'op']" v-model="filter.values[0].op"
@change="UpdateFilter(filter)" /> @change="UpdateFilter(filter, 0)"
label="Operator" />
<form-date
v-if="filter.between !== undefined && filter.between"
type="date"
v-model="filter.values[1].val"
:label="
filter.title +
(filter.between !== undefined && filter.between ? ' (Bitiş)' : '')
"
@change="UpdateFilter(filter, 1)" />
</div> </div>
</template> </template>
<template v-if="filter.filter.type === 'text'"> <template v-if="filter.type === 'text'">
<div class="panel-content-item"> <div class="panel-content-item">
<form-input <form-input
v-model="localFilterData[filter.name]" v-model="filter.values[0].val"
:label="filter.title" :label="filter.title"
@change="UpdateFilter(filter)" /> @change="UpdateFilter(filter, 0)" />
<form-select <form-select
v-if="filter.filter.range !== undefined && filter.filter.range" v-if="filter.range !== undefined && filter.range"
:listData="filterOperator" :listData="filterOperator"
v-model="localFilterData[filter.name + 'op']" v-model="filter.values[0].op"
@change="UpdateFilter(filter)" /> @change="UpdateFilter(filter, 0)"
label="Operator" />
</div> </div>
</template> </template>
<template v-if="filter.filter.type === 'select'"> <template v-if="filter.type === 'select'">
<div class="panel-content-item"> <div class="panel-content-item">
<form-select <form-select
:listData="filter.filter.data" :listData="filterHead[filter.hIndex].filter.data"
:listText="filter.filter.listText" :listText="filterHead[filter.hIndex].filter.listText"
:listVal="filter.filter.listVal" :listVal="filterHead[filter.hIndex].filter.listVal"
:extraData="filter" :extraData="{ f: filter, k: filterHead[filter.hIndex].filter.listText }"
:label="filter.title" :label="filter.title"
v-model="localFilterData[filter.filter.filterId || filter.name] as number" v-model="filter.values[0].val"
@change="UpdateFilterSelect" @change="UpdateFilterSelect"
clearable /> clearable />
</div> </div>
</template> </template>
</template> </template>
</template>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref, reactive, onBeforeMount, nextTick } from 'vue' import { ref } from 'vue'
import { useRouter, useRoute } from 'vue-router'
const router = useRouter()
const route = useRoute()
const props = defineProps<{ const props = defineProps<{
filterHead: Record<string, any> filterHead: Record<string, any>[]
filterParams: Record<string, any> filterParams: Record<string, any>[]
isUseRoute?: boolean
}>() }>()
const emit = defineEmits(['update:filterParams']) const emit = defineEmits(['update:filterParams'])
const localFilterParams = ref<Record<string, any>[]>(props.filterParams)
const localFilterData = reactive<Record<string, any>>({})
const localFilterParams = reactive<Record<string, any>>(
Object.assign(props.filterParams)
)
const filterOperator = ref<string[]>(['=', '<', '>']) const filterOperator = ref<string[]>(['=', '<', '>'])
const createFilterData = () => { const UpdateFilter = (filter: Record<string, any>, index: number) => {
props.filterHead.forEach((d: Record<string, any>) => { const allEmpty: boolean = filter.values.every(
if (d.filter !== undefined) { (obj: Record<string, any>) => obj.val === ''
let filterKey = d.filter.filterId || d.name )
localFilterData[filterKey] = '' if (filter.values[index].val === '') filter.values[index].text = ''
localFilterData[filterKey + 'op'] = '=' filter.filter = !allEmpty
}
})
Object.keys(localFilterParams).forEach((k, i) => {
localFilterData[k] = localFilterParams[k].val
localFilterData[k + 'op'] = localFilterParams[k].op
})
}
const UpdateFilter = (k: Record<string, any>) => {
let filterKey = k.filter.filterId || k.name
if (localFilterData[filterKey] !== '') {
localFilterParams[filterKey] = {}
localFilterParams[filterKey].val = localFilterData[filterKey]
localFilterParams[filterKey].op = localFilterData[filterKey + 'op']
localFilterParams[filterKey].title = k.title
} else delete localFilterParams[filterKey]
emit('update:filterParams', localFilterParams)
} }
const UpdateFilterSelect = ( const UpdateFilterSelect = (
e: Event, e: Event,
@ -109,20 +106,13 @@
d: Record<string, any>, d: Record<string, any>,
ext: Record<string, any> ext: Record<string, any>
) => { ) => {
let filterKey = ext.filter.filterId || ext.name if (v !== '' && v !== null) {
if (v !== '' && v !== null && localFilterData[filterKey] !== '') { ext.f.values[0].val = v
localFilterParams[filterKey] = {} ext.f.values[0].text = d[ext.k]
localFilterParams[filterKey].val = localFilterData[filterKey] ext.f.filter = true
localFilterParams[filterKey].op = localFilterData[filterKey + 'op']
localFilterParams[filterKey].title = ext.title
localFilterParams[filterKey].text = d[ext.filter.listText]
} else { } else {
delete localFilterParams[filterKey] ext.f.filter = false
ext.f.values[0].text = ''
} }
emit('update:filterParams', localFilterParams)
} }
onBeforeMount(() => {
createFilterData()
})
</script> </script>

View File

@ -32,7 +32,7 @@
</div> </div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref, computed, onMounted, onBeforeMount, watch } from 'vue' import { ref, computed, onMounted, onBeforeMount, watch, nextTick } from 'vue'
import { useGlobalStore } from '@/stores/globalStore' import { useGlobalStore } from '@/stores/globalStore'
const globalStore = useGlobalStore() const globalStore = useGlobalStore()
import { useRouter, useRoute } from 'vue-router' import { useRouter, useRoute } from 'vue-router'
@ -85,9 +85,11 @@
currentTab.value = Number(d) currentTab.value = Number(d)
} }
if (props.isUseRoute) { if (props.isUseRoute) {
nextTick(() => {
router.push({ router.push({
params: { ...route.params, tabid: props.tabList[currentTab.value].id } params: { ...route.params, tabid: props.tabList[currentTab.value].id }
}) })
})
} }
CalculateNavPosition() CalculateNavPosition()
} }

View File

@ -5,7 +5,6 @@ import FormInput from './FormInput.vue'
import FormDate from './FormDate.vue' import FormDate from './FormDate.vue'
import FormFile from './FormFile.vue' import FormFile from './FormFile.vue'
import FormTextarea from './FormTextarea.vue' import FormTextarea from './FormTextarea.vue'
import FormQuill from './FormQuill.vue'
import FormSummer from './FormSummer.vue' import FormSummer from './FormSummer.vue'
import FormSelect from './FormSelect.vue' import FormSelect from './FormSelect.vue'
import FormRadio from './FormRadio.vue' import FormRadio from './FormRadio.vue'
@ -25,7 +24,6 @@ export {
FormDate, FormDate,
FormFile, FormFile,
FormTextarea, FormTextarea,
FormQuill,
FormSummer, FormSummer,
FormSelect, FormSelect,
FormRadio, FormRadio,

View File

@ -5,6 +5,23 @@ import router from '@/router'
axios.defaults.baseURL = import.meta.env.VITE_API_URL axios.defaults.baseURL = import.meta.env.VITE_API_URL
//axios.defaults.timeout = 2000; //axios.defaults.timeout = 2000;
axios.defaults.headers['Content-Type'] = 'application/json; charset=utf-8' axios.defaults.headers['Content-Type'] = 'application/json; charset=utf-8'
//Filtrelerde aynı key birden fazla parametre array ile eklendiğinde url oluştururken [] ekleyerek oluşturmasını engellemek için serializer eklendi
axios.defaults.paramsSerializer = (params) => {
const queryParts: string[] = []
for (const key in params) {
const value = params[key]
if (Array.isArray(value)) {
value.forEach((v) => {
queryParts.push(`${key}=${encodeURIComponent(v)}`)
})
} else if (value !== undefined && value !== null) {
queryParts.push(`${key}=${encodeURIComponent(value)}`)
}
}
return queryParts.join('&')
}
import { useDataStore } from '@/stores/dataStore' import { useDataStore } from '@/stores/dataStore'
// İstek Öncesinde Çalışacak Bir Fonksiyon // İstek Öncesinde Çalışacak Bir Fonksiyon
@ -48,7 +65,7 @@ axios.interceptors.response.use(
const token = sessionStorage.getItem(usersStore.userStorageKeys.TOKEN) const token = sessionStorage.getItem(usersStore.userStorageKeys.TOKEN)
if (token !== undefined) { if (token !== undefined) {
usersStore.ResetUserData() usersStore.ResetUserData()
router.push('/giris') router.push('/login')
} }
} }
return Promise.reject(error) return Promise.reject(error)

View File

@ -71,7 +71,7 @@
let dt = await dataStore.dataPost('Auth/logout') let dt = await dataStore.dataPost('Auth/logout')
} }
usersStore.ResetUserData() usersStore.ResetUserData()
router.push('/giris') router.push('/login')
} }
const closeProfileMenu = (e: Event) => { const closeProfileMenu = (e: Event) => {

View File

@ -1,7 +1,7 @@
import ForgotPassword from '@/module/auth/views/ForgotPassword.vue' import ForgotPassword from '@/module/auth/views/ForgotPassword.vue'
export default { export default {
path: '/sifremi-unuttum', path: '/forgot-password',
name: 'ForgotPassword', name: 'ForgotPassword',
component: ForgotPassword, component: ForgotPassword,
meta: { meta: {

View File

@ -1,6 +1,11 @@
import Login from '@/module/auth/routes/login' import Login from "@/module/auth/routes/login";
import Register from '@/module/auth/routes/register' import Register from "@/module/auth/routes/register";
import ForgotPassword from '@/module/auth/routes/forgot-password' import ForgotPassword from "@/module/auth/routes/forgot-password";
import ResetPassword from '@/module/auth/routes/reset-password'
export default [
Login,
Register,
ForgotPassword
]
export default [Login, Register, ForgotPassword, ResetPassword]

View File

@ -1,7 +1,7 @@
import Login from '@/module/auth/views/Login.vue' import Login from '@/module/auth/views/Login.vue'
export default { export default {
path: '/giris', path: '/login',
name: 'Login', name: 'Login',
component: Login, component: Login,
meta: { meta: {

View File

@ -1,7 +1,7 @@
import Register from '@/module/auth/views/Register.vue' import Register from '@/module/auth/views/Register.vue'
export default { export default {
path: '/kayit-ol', path: '/register',
name: 'Register', name: 'Register',
component: Register, component: Register,
meta: { meta: {

View File

@ -1,10 +0,0 @@
import ResetPassword from '@/module/auth/views/ResetPassword.vue'
export default {
path: '/sifreyi-sifirla',
name: 'ResetPassword',
component: ResetPassword,
meta: {
authpage: true
}
}

View File

@ -1,59 +1,17 @@
import { defineStore } from 'pinia' import { defineStore } from 'pinia'
import { useDataStore } from '@/stores/dataStore' import { useDataStore } from '@/stores/dataStore'
import { useAuthStore } from '../stores/authStore' import { useAuthStore } from '../stores/authStore'
import { useAuthValidationStore } from '../validation/authValidationStore'
import { useUsersStore } from '@/stores/usersStore'
import router from '@/router'
export const useAuthService = defineStore('authService', () => { export const useAppService = defineStore('appService', () => {
const dataStore = useDataStore() const dataStore = useDataStore()
const authStore = useAuthStore() const authStore = useAuthStore()
const authValidationStore = useAuthValidationStore()
const usersStore = useUsersStore()
const Login = async () => { const GetAAuthRoleList = async () => {
if (authValidationStore.LoginFormCheck()) { if (authStore.rolesList.length === 0) {
let login = await dataStore.dataPost('Auth/login', { let data = await dataStore.dataGet('Auth/rolelistesi')
data: authStore.loginData authStore.rolesList = data
})
Object.assign(authStore.loginData, authStore.safeLoginData)
if (login !== 'errorfalse') {
await usersStore.SetUserSessionData(login)
await usersStore.SetUserData()
if (usersStore.isPanelUser) {
router.push('/')
} else {
if (usersStore.userStatus === 0 || usersStore.userStatus === null) {
router.push('/profil')
} else {
router.push('/')
}
}
} else {
authValidationStore.loginMessageType = 'alert'
authValidationStore.loginMessage =
'Kullanıcı adı veya şifrenizi yanlış girdiniz. Lütfen kontrol edip tekrar deneyiniz.'
authValidationStore.isLoginMessage = true
}
} else {
authValidationStore.isLoginFormValid = true
} }
} }
const ResetPassword = async () => { return {GetAAuthRoleList}
if (authValidationStore.ResetPasswordFormCheck()) {
let dt: any
dt = await dataStore.dataPost('ResetPassword', {
data: authStore.resetPasswordForm
})
if (dt !== 'errorfalse') {
}
} else {
authValidationStore.isResetPasswordFormValid = true
}
}
return { Login, ResetPassword }
}) })

View File

@ -1,19 +1,12 @@
import { defineStore } from 'pinia' import { defineStore } from 'pinia'
import { ref, reactive } from 'vue' import { ref,reactive } from 'vue'
export const useAuthStore = defineStore('authStore', () => { export const useAuthStore = defineStore('authStore', () => {
const loginData = reactive<Record<string, any>>({ username: '', password: '' }) const loginData = reactive<Record<string, any>>({ username: '', password: '' })
const safeLoginData = reactive<Record<string, any>>({}) const safeLoginData = reactive<Record<string, any>>({})
const rolesList = ref<Record<string, any>[]>([]) const rolesList = ref<Record<string, any>[]>([])
const resetCheckData = ref<string>('')
const resetPasswordForm = reactive<Record<string, any>>({
newPassword: '',
newPasswordRepeat: '',
check: ''
})
Object.assign(safeLoginData, loginData) Object.assign(safeLoginData, loginData)
return { loginData, safeLoginData, rolesList, resetPasswordForm, resetCheckData } return { loginData, safeLoginData, rolesList }
}) })

View File

@ -0,0 +1,46 @@
import { defineStore } from 'pinia'
import { ref, reactive } from 'vue'
import { useAuthStore } from './authStore'
import { useValidationStore } from '@/stores/validationStore'
export const useAuthValidationStore = defineStore('authValidationStore', () => {
const authStore = useAuthStore()
const validationStore = useValidationStore()
const isFormValid = ref<boolean>(true)
const isLoginMessage = ref<boolean>(false)
const loginMessageType = ref<string>('success')
const loginMessage = ref<string>('')
const registerMessage = ref<string>('')
const invalidTexts = reactive<Record<string, any>>({})
const FormCheck = (): boolean => {
Object.assign(invalidTexts, {})
validationStore.IsFieldEmpty(
authStore.loginData,
invalidTexts,
'username',
'Kullanıcı adı alanını doldurmalısınız. Örn: isim@alanadi.td'
)
validationStore.IsFieldEmpty(
authStore.loginData,
invalidTexts,
'password',
'Lütfen şifrenizi giriniz.'
)
isFormValid.value = Object.keys(invalidTexts).length === 0
return isFormValid.value
}
return {
isFormValid,
invalidTexts,
isLoginMessage,
loginMessageType,
loginMessage,
registerMessage,
FormCheck
}
})

View File

@ -1,89 +0,0 @@
import { defineStore } from 'pinia'
import { ref, reactive } from 'vue'
import { useValidationStore } from '@/stores/validationStore'
import { useAuthStore } from '../stores/authStore'
export const useAuthValidationStore = defineStore('authValidationStore', () => {
const validationStore = useValidationStore()
const authStore = useAuthStore()
const isLoginMessage = ref<boolean>(false)
const loginMessageType = ref<string>('success')
const loginMessage = ref<string>('')
const registerMessage = ref<string>('')
const loginInvalidTexts = reactive<Record<string, any>>({})
const isLoginFormValid = ref<boolean>(true)
const resetPasswordFormChanged = ref<boolean>(false)
const isResetPasswordFormValid = ref<boolean>(true)
const resetPasswordInvalidTexts = reactive<Record<string, any>>({})
const LoginFormCheck = (): boolean => {
Object.assign(loginInvalidTexts, {})
validationStore.IsFieldEmpty(
authStore.loginData,
loginInvalidTexts,
'username',
'Kullanıcı adı alanını doldurmalısınız. Örn: isim@alanadi.td'
)
validationStore.IsFieldEmpty(
authStore.loginData,
loginInvalidTexts,
'password',
'Lütfen şifrenizi giriniz.'
)
isLoginFormValid.value = Object.keys(loginInvalidTexts).length === 0
return isLoginFormValid.value
}
const ResetPasswordFormCheck = (): boolean => {
Object.assign(resetPasswordInvalidTexts, {})
validationStore.IsFieldEmpty(
authStore.resetPasswordForm,
resetPasswordInvalidTexts,
'newPassword',
'Lütfen yeni şifrenizi giriniz.'
)
validationStore.IsFieldEmpty(
authStore.resetPasswordForm,
resetPasswordInvalidTexts,
'newPasswordRepeat',
'Lütfen yeni şifrenizi tekrar giriniz.'
)
if (
!validationStore.checkEmpty(authStore.resetPasswordForm.newPassword) &&
!validationStore.checkEmpty(authStore.resetPasswordForm.newPasswordRepeat)
) {
if (
authStore.resetPasswordForm.newPassword !==
authStore.resetPasswordForm.newPasswordRepeat
) {
isResetPasswordFormValid.value = false
resetPasswordInvalidTexts.newPasswordRepeat =
'Şifrenizi tekrar doğru girdiğinizden emin olunuz.'
}
}
isResetPasswordFormValid.value = Object.keys(resetPasswordInvalidTexts).length === 0
return isResetPasswordFormValid.value
}
return {
isLoginMessage,
loginMessageType,
loginMessage,
loginInvalidTexts,
registerMessage,
isLoginFormValid,
resetPasswordFormChanged,
isResetPasswordFormValid,
resetPasswordInvalidTexts,
LoginFormCheck,
ResetPasswordFormCheck
}
})

View File

@ -24,7 +24,7 @@
</button> </button>
</form> </form>
<div class="login-nav login-nav-back"> <div class="login-nav login-nav-back">
<RouterLink to="/giris">&lt; Geri</RouterLink> <RouterLink to="/login">&lt; Geri</RouterLink>
</div> </div>
</div> </div>
</section> </section>

View File

@ -3,12 +3,14 @@
<section class="section-login"> <section class="section-login">
<div class="login-header"> <div class="login-header">
<div class="logo-header"> <div class="logo-header">
<img src="@/assets/images/cekilisevi-logo-n.png" alt="MPI Çekiliş Evi" /> <img
src="@/assets/images/cekilisevi-logo-n.png"
alt="MPI Çekiliş Evi"/>
</div> </div>
<h1>Giriş Yap</h1> <h1>Giriş Yap</h1>
</div> </div>
<div class="section-content"> <div class="section-content">
<form action="#" id="login-form" @submit.prevent="authService.Login"> <form action="#" id="login-form" @submit.prevent="Login">
<form-input <form-input
type="email" type="email"
modelKey="username" modelKey="username"
@ -16,11 +18,12 @@
required required
label="Kullanıcı Adı (e-posta adresi)" label="Kullanıcı Adı (e-posta adresi)"
placeholder="eposta@alanadi.com" placeholder="eposta@alanadi.com"
:invalidText="authValidationStore.loginInvalidTexts.username" /> :invalidText="authValidationStore.invalidTexts.username" />
<form-input <form-input
type="password" type="password"
label="Şifre" label="Şifre"
v-model="authStore.loginData.password" v-model="authStore.loginData.password"
required /> required />
@ -29,38 +32,64 @@
v-if="authValidationStore.isLoginMessage"> v-if="authValidationStore.isLoginMessage">
<span>{{ authValidationStore.loginMessage }}</span> <span>{{ authValidationStore.loginMessage }}</span>
</div> </div>
<button <button class="button-c button-second button-login" type="submit">
class="button-c button-second button-login"
type="submit"
@submit="authService.Login"
@click="authService.Login">
Giriş Yap Giriş Yap
</button> </button>
</form> </form>
<div class="login-nav"> <div class="login-nav">
<RouterLink to="/sifremi-unuttum">Şifremi Unuttum</RouterLink> <RouterLink to="/forgot-password">Şifremi Unuttum</RouterLink>
<RouterLink to="/kayit-ol">Kayıt Ol</RouterLink> <RouterLink to="/register">Kaydol</RouterLink>
</div> </div>
</div> </div>
</section> </section>
</GuestLayout> </GuestLayout>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { onBeforeMount } from 'vue' import { onBeforeMount, reactive, ref } from 'vue'
import { useUsersStore } from '@/stores/usersStore' import { useUsersStore } from '@/stores/usersStore'
const usersStore = useUsersStore() const usersStore = useUsersStore()
import { useDataStore } from '@/stores/dataStore'
const dataStore = useDataStore()
import { useAuthStore } from '../stores/authStore' import { useAuthStore } from '../stores/authStore'
const authStore = useAuthStore() const authStore = useAuthStore()
import { useAuthValidationStore } from '../validation/authValidationStore' import { useAuthValidationStore } from '../stores/authValidationStore'
const authValidationStore = useAuthValidationStore() const authValidationStore = useAuthValidationStore()
import { useAuthService } from '../services/authService'
const authService = useAuthService()
import router from '@/router' import router from '@/router'
import GuestLayout from '@/layouts/GuestLayout.vue' import GuestLayout from '@/layouts/GuestLayout.vue'
const Login = async () => {
if (authValidationStore.FormCheck()) {
let login = await dataStore.dataPost('Auth/login', {
data: authStore.loginData
})
Object.assign(authStore.loginData, authStore.safeLoginData)
if (login !== 'errorfalse') {
await usersStore.SetUserSessionData(login)
await usersStore.SetUserData()
if (usersStore.isPanelUser) {
router.push('/')
} else {
if (usersStore.userStatus === 0 || usersStore.userStatus === null) {
router.push('/profil')
} else {
router.push('/')
}
}
} else {
authValidationStore.loginMessageType = 'alert'
authValidationStore.loginMessage =
'Kullanıcı adı veya şifrenizi yanlış girdiniz. Lütfen kontrol edip tekrar deneyiniz.'
authValidationStore.isLoginMessage = true
}
} else {
authValidationStore.isFormValid = true
}
}
onBeforeMount(() => { onBeforeMount(() => {
if (usersStore.userIsAuth) router.push('/') if(usersStore.userIsAuth) router.push('/')
}) })
</script> </script>

View File

@ -339,7 +339,7 @@
</button> </button>
</form> </form>
<div class="login-nav login-nav-back"> <div class="login-nav login-nav-back">
<RouterLink to="/giris">&lt; Geri</RouterLink> <RouterLink to="/login">&lt; Geri</RouterLink>
</div> </div>
</div> </div>
</section> </section>
@ -355,7 +355,7 @@
const globalDataStore = useGlobalDataStore() const globalDataStore = useGlobalDataStore()
import { useValidationStore } from '@/stores/validationStore' import { useValidationStore } from '@/stores/validationStore'
const validationStore = useValidationStore() const validationStore = useValidationStore()
import { useAuthValidationStore } from '../validation/authValidationStore' import { useAuthValidationStore } from '../stores/authValidationStore'
const authValidationStore = useAuthValidationStore() const authValidationStore = useAuthValidationStore()
import router from '@/router' import router from '@/router'
@ -413,7 +413,7 @@
'Başarıyla kayıt oldunuz. Kullanıcı adı ve şifreniz ile giriş yapabilirsiniz.' 'Başarıyla kayıt oldunuz. Kullanıcı adı ve şifreniz ile giriş yapabilirsiniz.'
authValidationStore.isLoginMessage = true authValidationStore.isLoginMessage = true
router.push('/giris') router.push('/login')
} }
} else { } else {
uyeBilgileriStore.isFormValid = true uyeBilgileriStore.isFormValid = true

View File

@ -1,62 +0,0 @@
<template>
<GuestLayout>
<section class="section-login">
<div class="login-header">
<div class="logo-header">
<img src="@/assets/images/cekilisevi-logo-n.png" alt="MPI Çekiliş Evi" />
</div>
<h1>Şifremi Sıfırla</h1>
</div>
<div class="section-content">
<form id="sifremi-unuttum" @submit.prevent="authService.ResetPassword">
<form-input
type="password"
modelKey="newPassword"
v-model="authStore.resetPasswordForm.newPassword"
required
label="Yeni Şifre"
placeholder="Yeni Şifre"
:invalidText="authValidationStore.resetPasswordInvalidTexts.newPassword" />
<form-input
type="password"
modelKey="newPasswordRepeat"
v-model="authStore.resetPasswordForm.newPasswordRepeat"
required
label="Yeni Şifre Tekrar"
placeholder="Yeni Şifre Tekrar"
:invalidText="
authValidationStore.resetPasswordInvalidTexts.newPasswordRepeat
" />
<button
class="button-c button-second button-login"
type="submit"
@submit="authService.ResetPassword"
@click="authService.ResetPassword">
Şifremi Sıfırla
</button>
</form>
<div class="login-nav login-nav-back">
<RouterLink to="/giris">&lt; Geri</RouterLink>
</div>
</div>
</section>
</GuestLayout>
</template>
<script setup lang="ts">
import { onMounted } from 'vue'
import GuestLayout from '@/layouts/GuestLayout.vue'
import { useAuthStore } from '../stores/authStore'
const authStore = useAuthStore()
import { useAuthService } from '../services/authService'
const authService = useAuthService()
import { useAuthValidationStore } from '../validation/authValidationStore'
const authValidationStore = useAuthValidationStore()
import { useRoute, useRouter } from 'vue-router'
const route = useRoute()
const router = useRouter()
onMounted(() => {
if (route.query && route.query.check !== undefined)
authStore.resetCheckData = route.query.check as string
else router.push('/giris')
})
</script>

View File

@ -0,0 +1,19 @@
<template>
<form-piyango-cekilis-tutanagi-display
v-if="
usersStore.isPanelUser ||
(piyangoStore.lotteryApprove !== 0 &&
piyangoStore.lotteryApprove !== 3 &&
piyangoStore.lotteryApprove !== 8)
" />
<form-piyango-cekilis-tutanagi v-else />
</template>
<script setup lang="ts">
import { useUsersStore } from '@/stores/usersStore'
const usersStore = useUsersStore()
import { usePiyangoStore } from '../stores/piyangoStore'
const piyangoStore = usePiyangoStore()
import FormPiyangoCekilisTutanagi from './form/FormPiyangoCekilisTutanagi.vue'
import FormPiyangoCekilisTutanagiDisplay from './display/FormPiyangoCekilisTutanagiDisplay.vue'
</script>

View File

@ -0,0 +1,107 @@
<template>
<div class="form-part">
<div class="form-part-title">
<h4>Çekiliş Tutanağı</h4>
<div class="form-part-title-buttons">
<icon-button
v-if="usersStore.isPanelUser"
icon="plus"
class="ico-section ico-section-header-btn"
@click="AddNewDocument" />
</div>
</div>
<div class="form-part-content" v-if="cekilisTutanagiStore.loaded">
<template v-if="cekilisTutanagiStore.cekilisTutanagiList.length > 0">
<template v-for="(file, i) in cekilisTutanagiStore.cekilisTutanagiList">
<file-list-item
:editable="false"
:data="file"
title="dokumanAdi"
:filePath="file.url">
<template #actionButtons v-if="usersStore.isPanelUser">
<i
class="ico-c ico-btn ico-section back-grad-alert"
@click.stop="DeleteDocumentPop(file)">
<svg><use href="/src/assets/images/icons.svg#trash"></use></svg>
</i>
</template>
</file-list-item>
</template>
</template>
<template v-else>
<div class="form-inner-comment" v-if="usersStore.isPanelUser">
Eklenmiş dosya bulunamadı.
</div>
<div class="form-inner-comment" v-else>
Eklenmiş dosya bulunamadı.
</div>
</template>
</div>
</div>
<panel-wrapper
v-if="cekilisTutanagiStore.documentPanel"
v-model="cekilisTutanagiStore.documentPanel"
panel-title="Doküman Ekle">
<template #panelContent>
<panel-piyango-cekilis-tutanagi />
</template>
<template #footerButton>
<div class="button-c button-save" @click="cekilisTutanagiService.SaveDocument">
Ekle
</div>
</template>
</panel-wrapper>
</template>
<script setup lang="ts">
import { ref, onBeforeMount } from 'vue'
import PanelPiyangoCekilisTutanagi from '../panel/PanelPiyangoCekilisTutanagi.vue'
import PanelWrapper from '@/components/PanelWrapper.vue'
import { useUsersStore } from '@/stores/usersStore'
const usersStore = useUsersStore()
import { usePiyangoCekilisTutanagiStore } from '../../stores/piyangoCekilisTutanagiStore'
const cekilisTutanagiStore = usePiyangoCekilisTutanagiStore()
import { usePiyangoCekilisTutanagiService } from '../../service/piyangoCekilisTutanagiService'
const cekilisTutanagiService = usePiyangoCekilisTutanagiService()
import { useDialogStore } from '@/components/global/dialogStore'
const dialogStore = useDialogStore()
import { useDataStore } from '@/stores/dataStore'
const dataStore = useDataStore()
const AddNewDocument = () => {
cekilisTutanagiStore.ResetForm()
cekilisTutanagiStore.isUpdate = false
cekilisTutanagiStore.documentPanel = true
}
const DeleteDocumentPop = (data: Record<string, any>) => {
dialogStore.CreateDialog({
title: 'Doküman Sil',
id: 'deletedoc',
content: 'Dokümanı silmek istediğinize emin misiniz? Bu işlem geri alınamaz.',
closeText: 'Vazgeç',
buttons: [
{
label: 'Doküman Sil',
type: 'alert',
function: () => DeleteDocument(data.id)
}
]
})
}
const DeleteDocument = async (id: number | string) => {
var dt = await dataStore.dataDelete('CekilisTutanak/' + id)
if (dt !== 'errorfalse') {
dialogStore.CloseDialog('deletedoc')
await cekilisTutanagiService.GetDocumentList()
}
}
onBeforeMount(async () => {
await cekilisTutanagiService.GetDocumentList()
})
</script>

View File

@ -0,0 +1,71 @@
<template>
<div class="form-part">
<div class="form-part-title">
<h4>Çekiliş Tutanağı</h4>
<div class="form-part-title-buttons">
<icon-button
v-if="!usersStore.isPanelUser"
icon="plus"
class="ico-section ico-section-header-btn"
@click="AddNewDocument" />
</div>
</div>
<div class="form-part-content" v-if="cekilisTutanagiStore.loaded">
<template v-if="cekilisTutanagiStore.cekilisTutanagiList.length > 0">
<template v-for="(file, i) in cekilisTutanagiStore.cekilisTutanagiList">
<file-list-item
:data="file"
title="dokumanAdi"
:filePath="file.url"
:editable="false" />
</template>
</template>
<template v-else>
<div class="form-inner-comment">
<span>
Eklenmiş dosya bulunamadı. Üstteki butonu kullanarak dosya ekleyebilirsiniz.
</span>
</div>
</template>
</div>
</div>
<panel-wrapper
v-if="cekilisTutanagiStore.documentPanel"
v-model="cekilisTutanagiStore.documentPanel"
panel-title="Doküman Ekle">
<template #panelContent>
<panel-piyango-cekilis-tutanagi />
</template>
<template #footerButton>
<div class="button-c button-save" @click="cekilisTutanagiService.SaveDocument">
Ekle
</div>
</template>
</panel-wrapper>
</template>
<script setup lang="ts">
import { ref, onBeforeMount } from 'vue'
import PanelPiyangoCekilisTutanagi from '../panel/PanelPiyangoCekilisTutanagi.vue'
import PanelWrapper from '@/components/PanelWrapper.vue'
import { useUsersStore } from '@/stores/usersStore'
const usersStore = useUsersStore()
import { usePiyangoStore } from '../../stores/piyangoStore'
const piyangoStore = usePiyangoStore()
import { usePiyangoCekilisTutanagiStore } from '../../stores/piyangoCekilisTutanagiStore'
const cekilisTutanagiStore = usePiyangoCekilisTutanagiStore()
import { usePiyangoCekilisTutanagiService } from '../../service/piyangoCekilisTutanagiService'
const cekilisTutanagiService = usePiyangoCekilisTutanagiService()
const AddNewDocument = () => {
cekilisTutanagiStore.ResetForm()
cekilisTutanagiStore.isUpdate = false
cekilisTutanagiStore.documentPanel = true
}
onBeforeMount(async () => {
await cekilisTutanagiService.GetDocumentList()
})
</script>

View File

@ -18,16 +18,27 @@
listVal="islemId" listVal="islemId"
v-model="piyangoOnayStore.piyangoOnayForm.onayDurumuIslemTipiId" v-model="piyangoOnayStore.piyangoOnayForm.onayDurumuIslemTipiId"
required required
:invalidText="piyangoOnayValidationStore.invalidTexts.onayDurumuIslemTipiId" /> :invalidText="piyangoOnayValidationStore.invalidTexts.onayDurumuIslemTipiId">
<template v-if="piyangoOnayStore.piyangoOnayForm.onayDurumuIslemTipiId === 4"> <template #option="{ optionData }">
<form-input <span
modelKey="izinSayisi" v-if="optionData && optionData.tipAdi"
v-model="piyangoOnayStore.piyangoOnayForm.izinSayisi" class="islem-status-badge"
required :class="piyangoStore.GetIslemStatusClass(optionData.tipAdi)">
label="İzin Sayı No" {{ optionData.tipAdi }}
placeholder="İzin Sayı No" </span>
:invalidText="piyangoOnayValidationStore.invalidTexts.izinSayisi" <span v-else>{{ optionData?.tipAdi || optionData }}</span>
@keyup="OnKeyup" /> </template>
<template #activator="{ activatorData }">
<span
v-if="activatorData && activatorData.tipAdi"
class="islem-status-badge"
:class="piyangoStore.GetIslemStatusClass(activatorData.tipAdi)">
{{ activatorData.tipAdi }}
</span>
<span v-else>Lütfen Seçim Yapınız</span>
</template>
</form-select>
<template v-if="showIzinFields">
<form-date <form-date
type="date" type="date"
required required
@ -36,12 +47,50 @@
label="İzin Tarihi" label="İzin Tarihi"
:invalidText="piyangoOnayValidationStore.invalidTexts.izinTarihi" :invalidText="piyangoOnayValidationStore.invalidTexts.izinTarihi"
@change="OnKeyup" /> @change="OnKeyup" />
<form-input
modelKey="izinSayisi"
v-model="piyangoOnayStore.piyangoOnayForm.izinSayisi"
required
label="İzin Sayısı"
placeholder="İzin Sayısı"
:invalidText="piyangoOnayValidationStore.invalidTexts.izinSayisi"
@keyup="OnKeyup" />
<form-textarea <form-textarea
v-model="piyangoOnayStore.piyangoOnayForm.izinAciklamasi" v-model="piyangoOnayStore.piyangoOnayForm.izinAciklamasi"
:invalidText="piyangoOnayValidationStore.invalidTexts.izinAciklamasi" :invalidText="piyangoOnayValidationStore.invalidTexts.izinAciklamasi"
label="İzin Açıklaması" label="İzin Açıklaması"
@keyup="OnKeyup" /> @keyup="OnKeyup" />
</template> </template>
<template v-if="showIzinVerildiFields">
<form-select
label="Müdürlük"
:listData="mudurlukListesi"
listText="name"
listVal="id"
v-model="piyangoOnayStore.piyangoOnayForm.mudurlukId"
required
:invalidText="piyangoOnayValidationStore.invalidTexts.mudurlukId"
@change="OnKeyup" />
<form-select
label="Çekiliş Görevlisi"
:listData="cekilisGorevlisiListesi"
listText="name"
listVal="id"
v-model="piyangoOnayStore.piyangoOnayForm.cekilisGorevlisiId"
required
:invalidText="piyangoOnayValidationStore.invalidTexts.cekilisGorevlisiId"
@change="OnKeyup" />
</template>
<form-select
v-if="showKapsamDisiSebebi"
label="Kapsam Dışı Sebebi"
:listData="kapsamDisiSebepListesi"
listText="name"
listVal="id"
v-model="piyangoOnayStore.piyangoOnayForm.kapsamDisiSebebi"
required
:invalidText="piyangoOnayValidationStore.invalidTexts.kapsamDisiSebebi"
@change="OnKeyup" />
<form-file <form-file
v-model="piyangoOnayStore.piyangoOnayForm.file" v-model="piyangoOnayStore.piyangoOnayForm.file"
elclass="panel-documents-item" elclass="panel-documents-item"
@ -55,7 +104,7 @@
</div> </div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { onBeforeMount } from 'vue' import { onBeforeMount, computed, ref } from 'vue'
import { usePiyangoOnayStore } from '../../stores/piyangoOnayStore' import { usePiyangoOnayStore } from '../../stores/piyangoOnayStore'
const piyangoOnayStore = usePiyangoOnayStore() const piyangoOnayStore = usePiyangoOnayStore()
import { usePiyangoOnayValidationStore } from '../../validation/piyangoOnayValidationStore' import { usePiyangoOnayValidationStore } from '../../validation/piyangoOnayValidationStore'
@ -66,6 +115,62 @@
const piyangoDataStore = usePiyangoDataStore() const piyangoDataStore = usePiyangoDataStore()
import { usePiyangoServices } from '../../service/piyangoServices' import { usePiyangoServices } from '../../service/piyangoServices'
const piyangoServices = usePiyangoServices() const piyangoServices = usePiyangoServices()
import { usePiyangoStore } from '../../stores/piyangoStore'
const piyangoStore = usePiyangoStore()
const kapsamDisiId = computed<number | null>(() => {
const kapsamDisi = piyangoDataStore.piyangoOnayDurumlari.find(
(item: Record<string, any>) => item.tipAdi === 'Kapsam Dışı'
)
return kapsamDisi ? kapsamDisi.islemId : null
})
const showIzinFields = computed<boolean>(() => {
return (
piyangoOnayStore.piyangoOnayForm.onayDurumuIslemTipiId === 4 ||
piyangoOnayStore.piyangoOnayForm.onayDurumuIslemTipiId === kapsamDisiId.value
)
})
const showIzinVerildiFields = computed<boolean>(() => {
return (
piyangoOnayStore.piyangoOnayForm.onayDurumuIslemTipiId === 4
)
})
const showKapsamDisiSebebi = computed<boolean>(() => {
return piyangoOnayStore.piyangoOnayForm.onayDurumuIslemTipiId === kapsamDisiId.value
})
const kapsamDisiSebepListesi = ref<Record<string, any>[]>([
{ id: '2/a', name: '2/a' },
{ id: '2/b', name: '2/b' },
{ id: '2/c', name: '2/c' },
{ id: '2/ç', name: '2/ç' },
{ id: '2/d', name: '2/d' },
{ id: '2/e', name: '2/e' },
{ id: '2/f', name: '2/f' },
{ id: '2/g', name: '2/g' },
{ id: 'Diğer', name: 'Diğer' }
])
const cekilisGorevlisiListesi = ref<Record<string, any>[]>([
{ id: 1, name: 'Antalya Şube Müdürlüğü' },
{ id: 2, name: 'Gaziantep Şube Müdürlüğü' },
{ id: 3, name: 'Aksaray Şube Müdürlüğü' },
{ id: 4, name: 'Kadıköy Şube Müdürlüğü' },
{ id: 5, name: 'Karşıyaka Şube Müdürlüğü' },
{ id: 6, name: 'Muğla Şube Müdürlüğü' },
{ id: 7, name: 'Trabzon Şube Müdürlüğü' },
{ id: 8, name: 'Noter' },
{ id: 9, name: 'Başkanlık Personeli' }
])
const mudurlukListesi = ref<Record<string, any>[]>([
{ id: 1, name: '1 No\'lu Özel Çekilişler İzin ve Takip Şubesi Müdürlüğü' },
{ id: 2, name: '2 No\'lu Özel Çekilişler İzin ve Takip Şubesi Müdürlüğü' },
{ id: 3, name: '3 No\'lu Özel Çekilişler İzin ve Takip Şubesi Müdürlüğü' }
])
const OnKeyup = () => { const OnKeyup = () => {
piyangoOnayValidationStore.formChanged = true piyangoOnayValidationStore.formChanged = true

View File

@ -8,7 +8,8 @@
:apiList="'OnayDurumu/GetSonOnayDurumlariList/' + piyangoStore.selectedLottery" :apiList="'OnayDurumu/GetSonOnayDurumlariList/' + piyangoStore.selectedLottery"
apiText="Piyango Onay Log Listesi" apiText="Piyango Onay Log Listesi"
page="form" page="form"
:refresh="piyangoOnayStore.refreshList" /> :refresh="piyangoOnayStore.refreshList"
:rowActions="rowActions" />
<panel-wrapper <panel-wrapper
v-if="piyangoOnayStore.onayFormPanel" v-if="piyangoOnayStore.onayFormPanel"
v-model="piyangoOnayStore.onayFormPanel" v-model="piyangoOnayStore.onayFormPanel"
@ -40,6 +41,10 @@
const piyangoStore = usePiyangoStore() const piyangoStore = usePiyangoStore()
import { usePiyangoDataStore } from '../../stores/piyangoDataStore' import { usePiyangoDataStore } from '../../stores/piyangoDataStore'
const piyangoDataStore = usePiyangoDataStore() const piyangoDataStore = usePiyangoDataStore()
import { useDialogStore } from '@/components/global/dialogStore'
const dialogStore = useDialogStore()
import { useDataStore } from '@/stores/dataStore'
const dataStore = useDataStore()
const loaded = ref<boolean>(false) const loaded = ref<boolean>(false)
@ -47,6 +52,24 @@
return piyangoDataStore.piyangoOnayDurumlari return piyangoDataStore.piyangoOnayDurumlari
}) })
const mudurlukListesi = ref<Record<string, any>[]>([
{ id: 1, name: '1 No\'lu Özel Çekilişler İzin ve Takip Şubesi Müdürlüğü' },
{ id: 2, name: '2 No\'lu Özel Çekilişler İzin ve Takip Şubesi Müdürlüğü' },
{ id: 3, name: '3 No\'lu Özel Çekilişler İzin ve Takip Şubesi Müdürlüğü' }
])
const cekilisGorevlisiListesi = ref<Record<string, any>[]>([
{ id: 1, name: 'Antalya Şube Müdürlüğü' },
{ id: 2, name: 'Gaziantep Şube Müdürlüğü' },
{ id: 3, name: 'Aksaray Şube Müdürlüğü' },
{ id: 4, name: 'Kadıköy Şube Müdürlüğü' },
{ id: 5, name: 'Karşıyaka Şube Müdürlüğü' },
{ id: 6, name: 'Muğla Şube Müdürlüğü' },
{ id: 7, name: 'Trabzon Şube Müdürlüğü' },
{ id: 8, name: 'Noter' },
{ id: 9, name: 'Başkanlık Personeli' }
])
const tableHeader = ref<Record<string, any>[]>([ const tableHeader = ref<Record<string, any>[]>([
{ {
name: 'tarih', name: 'tarih',
@ -59,7 +82,7 @@
sort: true, sort: true,
filter: { filter: {
type: 'date', type: 'date',
range: true between: true
} }
}, },
{ {
@ -72,6 +95,11 @@
name: 'onayDurumuIslemTipiAdi', name: 'onayDurumuIslemTipiAdi',
title: 'İşlem', title: 'İşlem',
sort: true, sort: true,
computeHtml: (v: Record<string, any>): string => {
const statusName = v.onayDurumuIslemTipiAdi || ''
const statusClass = piyangoStore.GetIslemStatusClass(statusName)
return `<span class='islem-status-badge ${statusClass}'>${statusName}</span>`
},
filter: { filter: {
type: 'select', type: 'select',
data: piyangoOnayDurumlari, data: piyangoOnayDurumlari,
@ -100,19 +128,92 @@
}, },
{ {
name: 'izinTarihi', name: 'izinTarihi',
title: 'İzin Tarihi' title: 'İzin Tarihi',
compute: (v: Record<string, any>): string => {
return v.izinTarihi === null || v.izinTarihi === undefined || v.izinTarihi === ''
? ''
: dateStore.dateFormat({ pattern: 'dd-mm-yy', date: v.izinTarihi })
}
}, },
{ {
name: 'izinAciklamasi', name: 'izinAciklamasi',
title: 'İzin Açıklaması' title: 'İzin Açıklaması'
}, },
{
name: 'kapsamDisiSebebi',
title: 'Kapsam Dışı Sebebi'
},
{
name: 'mudurluk',
title: 'Müdürlük',
compute: (v: Record<string, any>): string => {
if (v.mudurluk === null || v.mudurluk === undefined || v.mudurluk === '') {
return ''
}
const mudurluk = mudurlukListesi.value.find((item: Record<string, any>) => item.id === v.mudurluk)
return mudurluk ? mudurluk.name : ''
}
},
{
name: 'cekilisGorevlisi',
title: 'Çekiliş Görevlisi',
compute: (v: Record<string, any>): string => {
if (v.cekilisGorevlisi === null || v.cekilisGorevlisi === undefined || v.cekilisGorevlisi === '') {
return ''
}
const gorevli = cekilisGorevlisiListesi.value.find((item: Record<string, any>) => item.id === v.cekilisGorevlisi)
return gorevli ? gorevli.name : ''
}
},
]) ])
const EditOnay = (d: Record<string, any>) => { const EditOnay = (d: Record<string, any>) => {
Object.assign(piyangoOnayStore.piyangoPanelOnayForm, d) Object.assign(piyangoOnayStore.piyangoPanelOnayForm, {
...piyangoOnayStore.piyangoOnayBaseForm,
...d,
izinAciklamasi: d.izinAciklamasi != null ? d.izinAciklamasi : '',
kapsamDisiSebebi: d.kapsamDisiSebebi != null ? d.kapsamDisiSebebi : null,
mudurlukId: d.mudurluk != null ? d.mudurluk : null,
cekilisGorevlisiId: d.cekilisGorevlisi != null ? d.cekilisGorevlisi : null
})
piyangoOnayStore.onayFormPanel = true piyangoOnayStore.onayFormPanel = true
} }
const DeleteRowPop = (data: Record<string, any>, i: number) => {
dialogStore.CreateDialog({
title: 'Onay Durumu Sil',
id: 'deleteonaydurumu',
content: 'Onay durumunu silmek istediğinize emin misiniz?',
closeText: 'Vazgeç',
buttons: [
{
label: 'Sil',
type: 'alert',
function: () => DeleteRow(data.id)
}
]
})
}
const DeleteRow = async (id: number | string) => {
var dt = await dataStore.dataDelete('OnayDurumu/' + id, {
toast: { toast: 'Onay durumu başarıyla silindi', type: 'success' }
})
if (dt !== 'errorfalse') {
dialogStore.CloseDialog('deleteonaydurumu')
window.location.reload()
}
}
const rowActions = ref<Record<string, any>[]>([
{
text: 'Sil',
class: 'alert',
action: DeleteRowPop
}
])
onBeforeMount(async () => { onBeforeMount(async () => {
loaded.value = true loaded.value = true
}) })

View File

@ -32,11 +32,11 @@
sort: true, sort: true,
filter: { filter: {
type: 'date', type: 'date',
range: true between: true
} }
}, },
{ {
name: 'islemYapanKullanici.email', name: 'islemYapanKullanici',
title: 'Kişi', title: 'Kişi',
sort: true, sort: true,
style: { width: '20%' } style: { width: '20%' }

View File

@ -0,0 +1,21 @@
<template>
<form-input
v-model="cekilisTutanagiStore.cekilisTutanagiForm.dokumanAdi"
label="Dosya Başlığı"
modelKey="dokumanAdi"
minlength="2"
:invalidText="cekilisTutanagiValidationStore.invalidTexts.dokumanAdi" />
<form-file
v-model="cekilisTutanagiStore.cekilisTutanagiForm.dosya"
elclass="panel-documents-item"
:invalidText="cekilisTutanagiValidationStore.invalidTexts.dosya" />
</template>
<script setup lang="ts">
import { useValidationStore } from '@/stores/validationStore'
const validationStore = useValidationStore()
import { usePiyangoCekilisTutanagiStore } from '../../stores/piyangoCekilisTutanagiStore'
const cekilisTutanagiStore = usePiyangoCekilisTutanagiStore()
import { usePiyangoCekilisTutanagiValidationStore } from '../../validation/piyangoCekilisTutanagiValidationStore'
const cekilisTutanagiValidationStore = usePiyangoCekilisTutanagiValidationStore()
</script>

View File

@ -108,6 +108,9 @@
} }
const OnIkramiyeChanged = (e: Event, val: any, item: Record<string, any>) => { const OnIkramiyeChanged = (e: Event, val: any, item: Record<string, any>) => {
piyangoDosyaKapamaStore.dosyaKapamaIkramiyeData.ikramiyeId = item.id
piyangoDosyaKapamaStore.dosyaKapamaIkramiyeData.tahhutEdilenIkramiye = ` piyangoDosyaKapamaStore.dosyaKapamaIkramiyeData.tahhutEdilenIkramiye = `
${item.cinsi}, ${item.marka}, ${item.model}, (${item.asilTalihliAdedi} adet) ${item.cinsi}, ${item.marka}, ${item.model}, (${item.asilTalihliAdedi} adet)
` `

View File

@ -7,16 +7,27 @@
listVal="islemId" listVal="islemId"
v-model="piyangoOnayStore.piyangoPanelOnayForm.onayDurumuIslemTipiId" v-model="piyangoOnayStore.piyangoPanelOnayForm.onayDurumuIslemTipiId"
required required
:invalidText="piyangoOnayValidationStore.invalidTextsPanel.onayDurumuIslemTipiId" /> :invalidText="piyangoOnayValidationStore.invalidTextsPanel.onayDurumuIslemTipiId">
<template v-if="piyangoOnayStore.piyangoPanelOnayForm.onayDurumuIslemTipiId === 4"> <template #option="{ optionData }">
<form-input <span
modelKey="izinSayisi" v-if="optionData && optionData.tipAdi"
v-model="piyangoOnayStore.piyangoPanelOnayForm.izinSayisi" class="islem-status-badge"
required :class="piyangoStore.GetIslemStatusClass(optionData.tipAdi)">
label="İzin Sayı No" {{ optionData.tipAdi }}
placeholder="İzin Sayı No" </span>
:invalidText="piyangoOnayValidationStore.invalidTextsPanel.izinSayisi" <span v-else>{{ optionData?.tipAdi || optionData }}</span>
@keyup="OnKeyup" /> </template>
<template #activator="{ activatorData }">
<span
v-if="activatorData && activatorData.tipAdi"
class="islem-status-badge"
:class="piyangoStore.GetIslemStatusClass(activatorData.tipAdi)">
{{ activatorData.tipAdi }}
</span>
<span v-else>Lütfen Seçim Yapınız</span>
</template>
</form-select>
<template v-if="showIzinFields">
<form-date <form-date
type="date" type="date"
required required
@ -25,12 +36,30 @@
label="İzin Tarihi" label="İzin Tarihi"
:invalidText="piyangoOnayValidationStore.invalidTextsPanel.izinTarihi" :invalidText="piyangoOnayValidationStore.invalidTextsPanel.izinTarihi"
@change="OnKeyup" /> @change="OnKeyup" />
<form-input
modelKey="izinSayisi"
v-model="piyangoOnayStore.piyangoPanelOnayForm.izinSayisi"
required
label="İzin Sayısı"
placeholder="İzin Sayısı"
:invalidText="piyangoOnayValidationStore.invalidTextsPanel.izinSayisi"
@keyup="OnKeyup" />
<form-textarea <form-textarea
v-model="piyangoOnayStore.piyangoPanelOnayForm.izinAciklamasi" v-model="piyangoOnayStore.piyangoPanelOnayForm.izinAciklamasi"
:invalidText="piyangoOnayValidationStore.invalidTextsPanel.izinAciklamasi" :invalidText="piyangoOnayValidationStore.invalidTextsPanel.izinAciklamasi"
label="İzin Açıklaması" label="İzin Açıklaması"
@keyup="OnKeyup" /> @keyup="OnKeyup" />
</template> </template>
<form-select
v-if="showKapsamDisiSebebi"
label="Kapsam Dışı Sebebi"
:listData="kapsamDisiSebepListesi"
listText="name"
listVal="id"
v-model="piyangoOnayStore.piyangoPanelOnayForm.kapsamDisiSebebi"
required
:invalidText="piyangoOnayValidationStore.invalidTextsPanel.kapsamDisiSebebi"
@change="OnKeyup" />
<form-file <form-file
v-model="piyangoOnayStore.piyangoPanelOnayForm.file" v-model="piyangoOnayStore.piyangoPanelOnayForm.file"
elclass="panel-documents-item" elclass="panel-documents-item"
@ -43,7 +72,7 @@
</div> </div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { onBeforeMount } from 'vue' import { onBeforeMount, computed, ref } from 'vue'
import { usePiyangoOnayStore } from '../../stores/piyangoOnayStore' import { usePiyangoOnayStore } from '../../stores/piyangoOnayStore'
const piyangoOnayStore = usePiyangoOnayStore() const piyangoOnayStore = usePiyangoOnayStore()
import { usePiyangoOnayValidationStore } from '../../validation/piyangoOnayValidationStore' import { usePiyangoOnayValidationStore } from '../../validation/piyangoOnayValidationStore'
@ -52,6 +81,38 @@
const piyangoDataStore = usePiyangoDataStore() const piyangoDataStore = usePiyangoDataStore()
import { usePiyangoServices } from '../../service/piyangoServices' import { usePiyangoServices } from '../../service/piyangoServices'
const piyangoServices = usePiyangoServices() const piyangoServices = usePiyangoServices()
import { usePiyangoStore } from '../../stores/piyangoStore'
const piyangoStore = usePiyangoStore()
const kapsamDisiId = computed<number | null>(() => {
const kapsamDisi = piyangoDataStore.piyangoOnayDurumlari.find(
(item: Record<string, any>) => item.tipAdi === 'Kapsam Dışı'
)
return kapsamDisi ? kapsamDisi.islemId : null
})
const showIzinFields = computed<boolean>(() => {
return (
piyangoOnayStore.piyangoPanelOnayForm.onayDurumuIslemTipiId === 4 ||
piyangoOnayStore.piyangoPanelOnayForm.onayDurumuIslemTipiId === kapsamDisiId.value
)
})
const showKapsamDisiSebebi = computed<boolean>(() => {
return piyangoOnayStore.piyangoPanelOnayForm.onayDurumuIslemTipiId === kapsamDisiId.value
})
const kapsamDisiSebepListesi = ref<Record<string, any>[]>([
{ id: '2/a', name: '2/a' },
{ id: '2/b', name: '2/b' },
{ id: '2/c', name: '2/c' },
{ id: '2/ç', name: '2/ç' },
{ id: '2/d', name: '2/d' },
{ id: '2/e', name: '2/e' },
{ id: '2/f', name: '2/f' },
{ id: '2/g', name: '2/g' },
{ id: 'Diğer', name: 'Diğer' }
])
const OnKeyup = () => { const OnKeyup = () => {
piyangoOnayValidationStore.formChanged = true piyangoOnayValidationStore.formChanged = true

View File

@ -34,14 +34,14 @@
:invalidText="piyangoTeminatValidationStore.invalidTexts.refundCount" /> :invalidText="piyangoTeminatValidationStore.invalidTexts.refundCount" />
<form-file <form-file
v-model="piyangoTeminatStore.piyangoTeminatFormData.refundDocumentUrl" v-model="piyangoTeminatStore.piyangoTeminatFormData.refundDocumentUrl"
label='Klasör Arşiv' label='İade Yazısı'
elclass="panel-documents-item" elclass="panel-documents-item"
:invalidText="piyangoTeminatValidationStore.invalidTexts.refundDocumentUrl" :invalidText="piyangoTeminatValidationStore.invalidTexts.refundDocumentUrl"
@change="OnKeyup" /> @change="OnKeyup" />
<form-input <form-input
modelKey="refundDescription" modelKey="refundDescription"
v-model="piyangoTeminatStore.piyangoTeminatFormData.refundDescription" v-model="piyangoTeminatStore.piyangoTeminatFormData.refundDescription"
label="İade Açıklama" label="Klasör Arşiv No"
@keyup="OnKeyup" /> @keyup="OnKeyup" />
</template> </template>

View File

@ -0,0 +1,71 @@
import { defineStore } from 'pinia'
import { useDataStore } from '@/stores/dataStore'
import { usePiyangoStore } from '../stores/piyangoStore'
import { usePiyangoCekilisTutanagiStore } from '../stores/piyangoCekilisTutanagiStore'
import { usePiyangoCekilisTutanagiValidationStore } from '../validation/piyangoCekilisTutanagiValidationStore'
export const usePiyangoCekilisTutanagiService = defineStore('piyangoCekilisTutanagiService', () => {
const dataStore = useDataStore()
const piyangoStore = usePiyangoStore()
const cekilisTutanagiStore = usePiyangoCekilisTutanagiStore()
const cekilisTutanagiValidationStore = usePiyangoCekilisTutanagiValidationStore()
const GetDocumentList = async () => {
cekilisTutanagiStore.cekilisTutanagiList.splice(
0,
cekilisTutanagiStore.cekilisTutanagiList.length
)
let dt = await dataStore.dataGet('CekilisTutanak/Cekilis/' + piyangoStore.selectedLottery, {
params: {
pageSize: 50
}
})
if (dt !== 'errorfalse') {
const dataList = Array.isArray(dt) ? dt : (dt.data || [])
cekilisTutanagiStore.cekilisTutanagiList.splice(
0,
cekilisTutanagiStore.cekilisTutanagiList.length,
...dataList
)
}
setTimeout(() => {
cekilisTutanagiStore.loaded = true
}, 30)
}
const SaveDocument = async () => {
if (cekilisTutanagiValidationStore.FormCheck()) {
const formData = new FormData()
formData.append('dosya', cekilisTutanagiStore.cekilisTutanagiForm.dosya)
formData.append('dokumanAdi', cekilisTutanagiStore.cekilisTutanagiForm.dokumanAdi)
formData.append('cekilisId', String(piyangoStore.selectedLottery))
let dt: any
if (!cekilisTutanagiStore.isUpdate) {
dt = await dataStore.dataPost('CekilisTutanak', {
data: formData,
headers: { 'Content-Type': 'multipart/form-data' }
})
} else {
dt = await dataStore.dataPut(
'CekilisTutanak/' + cekilisTutanagiStore.cekilisTutanagiForm.id,
{
data: formData,
headers: { 'Content-Type': 'multipart/form-data' }
}
)
}
if (dt !== 'errorfalse') {
await GetDocumentList()
cekilisTutanagiStore.documentPanel = false
cekilisTutanagiStore.isUpdate = false
}
} else {
cekilisTutanagiValidationStore.isFormValid = true
}
}
return { GetDocumentList, SaveDocument }
})

View File

@ -62,7 +62,6 @@ export const usePiyangoKatilimciService = defineStore('piyangoKatilimciService',
const KatilimciFileUpload = async () => { const KatilimciFileUpload = async () => {
if (piyangoKatilimciValidationStore.FileFormCheck()) { if (piyangoKatilimciValidationStore.FileFormCheck()) {
console.log('Katilimci File Upload')
const formData = new FormData() const formData = new FormData()
formData.append('excelFile', piyangoKatilimciStore.piyangoKatilimciFileFormData.excelFile) formData.append('excelFile', piyangoKatilimciStore.piyangoKatilimciFileFormData.excelFile)
let dt: any let dt: any

View File

@ -4,6 +4,7 @@ import { usePiyangoStore } from '../stores/piyangoStore'
import { usePiyangoOnayStore } from '../stores/piyangoOnayStore' import { usePiyangoOnayStore } from '../stores/piyangoOnayStore'
import { usePiyangoOnayValidationStore } from '../validation/piyangoOnayValidationStore' import { usePiyangoOnayValidationStore } from '../validation/piyangoOnayValidationStore'
import { useUsersStore } from '@/stores/usersStore' import { useUsersStore } from '@/stores/usersStore'
import { usePiyangoDataStore } from '../stores/piyangoDataStore'
export const usePiyangoOnayService = defineStore('piyangoOnayService', () => { export const usePiyangoOnayService = defineStore('piyangoOnayService', () => {
const dataStore = useDataStore() const dataStore = useDataStore()
@ -11,6 +12,18 @@ export const usePiyangoOnayService = defineStore('piyangoOnayService', () => {
const piyangoOnayStore = usePiyangoOnayStore() const piyangoOnayStore = usePiyangoOnayStore()
const piyangoOnayValidationStore = usePiyangoOnayValidationStore() const piyangoOnayValidationStore = usePiyangoOnayValidationStore()
const usersStore = useUsersStore() const usersStore = useUsersStore()
const piyangoDataStore = usePiyangoDataStore()
const getKapsamDisiId = (): number | null => {
const kapsamDisi = piyangoDataStore.piyangoOnayDurumlari.find(
(item: Record<string, any>) => item.tipAdi === 'Kapsam Dışı'
)
return kapsamDisi ? kapsamDisi.islemId : null
}
const shouldKeepIzinFields = (islemTipiId: number | null): boolean => {
return islemTipiId === 4 || islemTipiId === getKapsamDisiId()
}
const SaveOnayDurum = async () => { const SaveOnayDurum = async () => {
if (piyangoOnayValidationStore.FormCheck()) { if (piyangoOnayValidationStore.FormCheck()) {
@ -18,11 +31,18 @@ export const usePiyangoOnayService = defineStore('piyangoOnayService', () => {
let form: any let form: any
let dataForm = new FormData() let dataForm = new FormData()
if (piyangoOnayStore.piyangoOnayForm.onayDurumuIslemTipiId !== 4) { if (!shouldKeepIzinFields(piyangoOnayStore.piyangoOnayForm.onayDurumuIslemTipiId)) {
piyangoOnayStore.piyangoOnayForm.izinSayisi = '' piyangoOnayStore.piyangoOnayForm.izinSayisi = ''
piyangoOnayStore.piyangoOnayForm.izinTarihi = '' piyangoOnayStore.piyangoOnayForm.izinTarihi = ''
piyangoOnayStore.piyangoOnayForm.izinAciklamasi = '' piyangoOnayStore.piyangoOnayForm.izinAciklamasi = ''
} }
if (piyangoOnayStore.piyangoOnayForm.onayDurumuIslemTipiId !== getKapsamDisiId()) {
piyangoOnayStore.piyangoOnayForm.kapsamDisiSebebi = null
}
if (piyangoOnayStore.piyangoOnayForm.onayDurumuIslemTipiId !== 4) {
piyangoOnayStore.piyangoOnayForm.mudurlukId = null
piyangoOnayStore.piyangoOnayForm.cekilisGorevlisiId = null
}
dataForm.append( dataForm.append(
'onayDurumuIslemTipiId', 'onayDurumuIslemTipiId',
piyangoOnayStore.piyangoOnayForm.onayDurumuIslemTipiId piyangoOnayStore.piyangoOnayForm.onayDurumuIslemTipiId
@ -30,10 +50,33 @@ export const usePiyangoOnayService = defineStore('piyangoOnayService', () => {
dataForm.append('onayCekilisId', String(piyangoStore.selectedLottery)) dataForm.append('onayCekilisId', String(piyangoStore.selectedLottery))
dataForm.append('kisiId', String(usersStore.userId)) dataForm.append('kisiId', String(usersStore.userId))
dataForm.append('file', piyangoOnayStore.piyangoOnayForm.file) dataForm.append('file', piyangoOnayStore.piyangoOnayForm.file)
dataForm.append('aciklama', piyangoOnayStore.piyangoOnayForm.aciklama) dataForm.append('aciklama', piyangoOnayStore.piyangoOnayForm.aciklama || '')
dataForm.append('izinSayisi', piyangoOnayStore.piyangoOnayForm.izinSayisi) dataForm.append('izinSayisi', piyangoOnayStore.piyangoOnayForm.izinSayisi || '')
dataForm.append('izinTarihi', piyangoOnayStore.piyangoOnayForm.izinTarihi) dataForm.append('izinTarihi', piyangoOnayStore.piyangoOnayForm.izinTarihi || '')
dataForm.append('izinAciklamasi', piyangoOnayStore.piyangoOnayForm.izinAciklamasi) dataForm.append(
'izinAciklamasi',
piyangoOnayStore.piyangoOnayForm.izinAciklamasi != null
? String(piyangoOnayStore.piyangoOnayForm.izinAciklamasi)
: ''
)
dataForm.append(
'kapsamDisiSebebi',
piyangoOnayStore.piyangoOnayForm.kapsamDisiSebebi != null
? String(piyangoOnayStore.piyangoOnayForm.kapsamDisiSebebi)
: ''
)
dataForm.append(
'mudurluk',
piyangoOnayStore.piyangoOnayForm.mudurlukId != null
? String(piyangoOnayStore.piyangoOnayForm.mudurlukId)
: ''
)
dataForm.append(
'cekilisGorevlisi',
piyangoOnayStore.piyangoOnayForm.cekilisGorevlisiId != null
? String(piyangoOnayStore.piyangoOnayForm.cekilisGorevlisiId)
: ''
)
form = await dataStore.dataPost('OnayDurumu/', { form = await dataStore.dataPost('OnayDurumu/', {
data: dataForm, data: dataForm,
@ -45,11 +88,8 @@ export const usePiyangoOnayService = defineStore('piyangoOnayService', () => {
piyangoOnayValidationStore.formChanged = false piyangoOnayValidationStore.formChanged = false
piyangoStore.lotteryApprove = piyangoStore.lotteryApprove =
piyangoOnayStore.piyangoOnayForm.onayDurumuIslemTipiId piyangoOnayStore.piyangoOnayForm.onayDurumuIslemTipiId
piyangoOnayStore.refreshList = true
piyangoOnayStore.ResetForm() piyangoOnayStore.ResetForm()
setTimeout(() => { window.location.reload()
piyangoOnayStore.loaded = true
}, 10)
} }
} else { } else {
piyangoOnayValidationStore.isFormValid = true piyangoOnayValidationStore.isFormValid = true
@ -61,25 +101,33 @@ export const usePiyangoOnayService = defineStore('piyangoOnayService', () => {
let form: any let form: any
let dataForm = new FormData() let dataForm = new FormData()
if (piyangoOnayStore.piyangoPanelOnayForm.onayDurumuIslemTipiId !== 4) { if (!shouldKeepIzinFields(piyangoOnayStore.piyangoPanelOnayForm.onayDurumuIslemTipiId)) {
piyangoOnayStore.piyangoPanelOnayForm.izinSayisi = '' piyangoOnayStore.piyangoPanelOnayForm.izinSayisi = ''
piyangoOnayStore.piyangoPanelOnayForm.izinTarihi = '' piyangoOnayStore.piyangoPanelOnayForm.izinTarihi = ''
piyangoOnayStore.piyangoPanelOnayForm.izinAciklamasi = '' piyangoOnayStore.piyangoPanelOnayForm.izinAciklamasi = ''
} }
dataForm.append( if (piyangoOnayStore.piyangoPanelOnayForm.onayDurumuIslemTipiId !== getKapsamDisiId()) {
'onayDurumuIslemTipiId', piyangoOnayStore.piyangoPanelOnayForm.kapsamDisiSebebi = null
piyangoOnayStore.piyangoOnayForm.onayDurumuIslemTipiId }
) dataForm.append('onayDurumuIslemTipiId', piyangoOnayStore.piyangoPanelOnayForm.onayDurumuIslemTipiId)
dataForm.append('id', piyangoOnayStore.piyangoPanelOnayForm.id) dataForm.append('id', piyangoOnayStore.piyangoPanelOnayForm.id)
dataForm.append('onayCekilisId', String(piyangoStore.selectedLottery)) dataForm.append('onayCekilisId', String(piyangoStore.selectedLottery))
dataForm.append('kisiId', String(usersStore.userId)) dataForm.append('kisiId', String(usersStore.userId))
dataForm.append('file', piyangoOnayStore.piyangoPanelOnayForm.file) dataForm.append('file', piyangoOnayStore.piyangoPanelOnayForm.file)
dataForm.append('aciklama', piyangoOnayStore.piyangoPanelOnayForm.aciklama) dataForm.append('aciklama', piyangoOnayStore.piyangoPanelOnayForm.aciklama || '')
dataForm.append('izinSayisi', piyangoOnayStore.piyangoPanelOnayForm.izinSayisi) dataForm.append('izinSayisi', piyangoOnayStore.piyangoPanelOnayForm.izinSayisi || '')
dataForm.append('izinTarihi', piyangoOnayStore.piyangoPanelOnayForm.izinTarihi) dataForm.append('izinTarihi', piyangoOnayStore.piyangoPanelOnayForm.izinTarihi || '')
dataForm.append( dataForm.append(
'izinAciklamasi', 'izinAciklamasi',
piyangoOnayStore.piyangoPanelOnayForm.izinAciklamasi piyangoOnayStore.piyangoPanelOnayForm.izinAciklamasi != null
? String(piyangoOnayStore.piyangoPanelOnayForm.izinAciklamasi)
: ''
)
dataForm.append(
'kapsamDisiSebebi',
piyangoOnayStore.piyangoPanelOnayForm.kapsamDisiSebebi != null
? String(piyangoOnayStore.piyangoPanelOnayForm.kapsamDisiSebebi)
: ''
) )
form = await dataStore.dataPut( form = await dataStore.dataPut(
@ -92,7 +140,11 @@ export const usePiyangoOnayService = defineStore('piyangoOnayService', () => {
) )
if (form !== 'errorfalse') { if (form !== 'errorfalse') {
piyangoOnayStore.refreshList = false
setTimeout(() => {
piyangoOnayStore.refreshList = true piyangoOnayStore.refreshList = true
}, 10)
piyangoOnayStore.onayFormPanel = false
} }
} else { } else {
piyangoOnayValidationStore.isPanelFormValid = true piyangoOnayValidationStore.isPanelFormValid = true

View File

@ -12,7 +12,7 @@ export const connectToHub = async () => {
connection = new signalR.HubConnectionBuilder() connection = new signalR.HubConnectionBuilder()
.withUrl(import.meta.env.VITE_SOCKET_URL, { .withUrl(import.meta.env.VITE_SOCKET_URL, {
withCredentials: true, withCredentials: false,
skipNegotiation: true, // WebSocket kullanırken negotiation atlanabilir skipNegotiation: true, // WebSocket kullanırken negotiation atlanabilir
transport: signalR.HttpTransportType.WebSockets transport: signalR.HttpTransportType.WebSockets
}) })

View File

@ -0,0 +1,37 @@
import { defineStore } from 'pinia'
import { ref, reactive } from 'vue'
import { usePiyangoStore } from './piyangoStore'
export const usePiyangoCekilisTutanagiStore = defineStore('piyangoCekilisTutanagiStore', () => {
const piyangoStore = usePiyangoStore()
const cekilisTutanagiList = ref<Record<string, any>[]>([])
const cekilisTutanagiBaseForm = reactive<Record<string, any>>({
dosya: null,
cekilisId: piyangoStore.selectedLottery,
dokumanAdi: ''
})
const cekilisTutanagiForm = reactive<Record<string, any>>({})
const cekilisTutanagiSafeForm = reactive<Record<string, any>>({})
const isUpdate = ref<boolean>(false)
const refreshList = ref<boolean>(false)
const documentPanel = ref<boolean>(false)
const loaded = ref<boolean>(false)
const ResetForm = () => {
Object.assign(cekilisTutanagiForm, cekilisTutanagiBaseForm)
}
return {
cekilisTutanagiList,
cekilisTutanagiBaseForm,
cekilisTutanagiForm,
cekilisTutanagiSafeForm,
isUpdate,
refreshList,
documentPanel,
loaded,
ResetForm
}
})

View File

@ -2,10 +2,13 @@ import { defineStore } from 'pinia'
import { ref, reactive } from 'vue' import { ref, reactive } from 'vue'
import { useGlobalStore } from '@/stores/globalStore' import { useGlobalStore } from '@/stores/globalStore'
import { usePiyangoStore } from './piyangoStore' import { usePiyangoStore } from './piyangoStore'
import { useUsersStore } from '@/stores/usersStore'
export const usePiyangoDosyaKapamaStore = defineStore('piyangoDosyaKapamaStore', () => { export const usePiyangoDosyaKapamaStore = defineStore('piyangoDosyaKapamaStore', () => {
const globalStore = useGlobalStore() const globalStore = useGlobalStore()
const piyangoStore = usePiyangoStore() const piyangoStore = usePiyangoStore()
const usersStore = useUsersStore()
const baseDosyaKapamaData = reactive<Record<string, any>>({ const baseDosyaKapamaData = reactive<Record<string, any>>({
katilimSekli: '', katilimSekli: '',
@ -49,6 +52,8 @@ export const usePiyangoDosyaKapamaStore = defineStore('piyangoDosyaKapamaStore',
teslimEdilenIkramiye: '', teslimEdilenIkramiye: '',
alinmayanIkramiye: '', alinmayanIkramiye: '',
aciklama: '', aciklama: '',
duzenleyenId: usersStore.userId,
ikramiyeId:'',
cekilisId: piyangoStore.selectedLottery cekilisId: piyangoStore.selectedLottery
}) })
const dosyaKapamaData = reactive<Record<string, any>>({}) const dosyaKapamaData = reactive<Record<string, any>>({})

View File

@ -15,7 +15,10 @@ export const usePiyangoOnayStore = defineStore('piyangoOnayStore', () => {
file: '', file: '',
izinSayisi: '', izinSayisi: '',
izinTarihi: '', izinTarihi: '',
izinAciklamasi: '' izinAciklamasi: '',
kapsamDisiSebebi: null,
mudurlukId: null,
cekilisGorevlisiId: null
}) })
const piyangoOnayForm = reactive<Record<string, any>>({}) const piyangoOnayForm = reactive<Record<string, any>>({})
const piyangoPanelOnayForm = reactive<Record<string, any>>({}) const piyangoPanelOnayForm = reactive<Record<string, any>>({})

View File

@ -131,13 +131,41 @@ export const usePiyangoStore = defineStore('piyangoStore', () => {
Object.assign(lotteryData, baseLotteryData) Object.assign(lotteryData, baseLotteryData)
} }
const GetIslemStatusClass = (statusName: string | undefined): string => {
if (!statusName) {
return 'islem-status-default'
}
// Her duruma benzersiz canlı renkler atanıyor
const statusMap: Record<string, string> = {
'Bilgi/Belge Eksik/Yanlış': 'islem-status-coral',
'Üzerinde Çalışılıyor': 'islem-status-amber',
'Başvuru İşleme Alındı': 'islem-status-sky',
'Başvuru Uygun Görülmedi': 'islem-status-rose',
'İzin Öncesi İptal': 'islem-status-pink',
'Kapsam Dışı': 'islem-status-slate',
'İzin Verildi': 'islem-status-emerald',
'Ceza Verildi': 'islem-status-red',
'İzin Sonrası İptal': 'islem-status-salmon',
'Kampanya Olumlu Bitti': 'islem-status-mint',
'Mükerrer Başvuru': 'islem-status-peach',
'Bekliyor': 'islem-status-yellow',
'Onaylandı': 'islem-status-teal',
'Katılımcı Listesi Yüklendi': 'islem-status-cyan',
'Düzenleme Bekliyor': 'islem-status-orange',
'Ön Kayıt Kabul Edildi': 'islem-status-blue',
'Yardım Amaçlı Piyango Son Onay': 'islem-status-gold',
'İnceleme Bekleniyor': 'islem-status-lavender',
'Yeni Piyango': 'islem-status-violet',
'Başvuru Reddedildi': 'islem-status-crimson',
'Değişiklik Talep Ediliyor': 'islem-status-indigo'
}
return statusMap[statusName] || 'islem-status-default'
}
const LoterryStatusClass = (d: any): string => { const LoterryStatusClass = (d: any): string => {
let cls = lotteryStatusTypes.value.filter((v) => { // Yeni renk sistemini kullan, ama back-grad sınıfı ekle (geriye dönük uyumluluk için)
return v.name === d const statusClass = GetIslemStatusClass(d)
}) return 'islem-status-badge ' + statusClass
if (cls !== undefined && cls !== null && cls.length !== 0)
return 'back-grad-' + cls[0].class
else return 'back-grad-waiting'
} }
const SetLotteryControlData = (data: Record<string, any>) => { const SetLotteryControlData = (data: Record<string, any>) => {
@ -181,6 +209,7 @@ export const usePiyangoStore = defineStore('piyangoStore', () => {
ResetLotteryData, ResetLotteryData,
ResetLotteryContent, ResetLotteryContent,
LoterryStatusClass, LoterryStatusClass,
GetIslemStatusClass,
SetLotteryControlData SetLotteryControlData
} }
}) })

View File

@ -0,0 +1,45 @@
import { defineStore } from 'pinia'
import { ref, reactive } from 'vue'
import { useValidationStore } from '@/stores/validationStore'
import { usePiyangoCekilisTutanagiStore } from '../stores/piyangoCekilisTutanagiStore'
export const usePiyangoCekilisTutanagiValidationStore = defineStore(
'piyangoCekilisTutanagiValidationStore',
() => {
const cekilisTutanagiStore = usePiyangoCekilisTutanagiStore()
const validationStore = useValidationStore()
const formChanged = ref<boolean>(false)
const isFormValid = ref<boolean>(true)
const invalidTexts = reactive<Record<string, any>>({})
const FormCheck = (): boolean => {
Object.assign(invalidTexts, {})
validationStore.IsFieldEmpty(
cekilisTutanagiStore.cekilisTutanagiForm,
invalidTexts,
'dokumanAdi',
'Döküman için bir başlık belirtmelisiniz.'
)
validationStore.IsFieldEmpty(
cekilisTutanagiStore.cekilisTutanagiForm,
invalidTexts,
'dosya',
'Bir döküman eklemelisiniz.'
)
isFormValid.value = Object.keys(invalidTexts).length === 0
return isFormValid.value
}
return {
formChanged,
isFormValid,
invalidTexts,
FormCheck
}
}
)

View File

@ -1,13 +1,15 @@
import { defineStore } from 'pinia' import { defineStore } from 'pinia'
import { ref, reactive } from 'vue' import { ref, reactive, computed } from 'vue'
import { useValidationStore } from '@/stores/validationStore' import { useValidationStore } from '@/stores/validationStore'
import { usePiyangoOnayStore } from '../stores/piyangoOnayStore' import { usePiyangoOnayStore } from '../stores/piyangoOnayStore'
import { usePiyangoDataStore } from '../stores/piyangoDataStore'
export const usePiyangoOnayValidationStore = defineStore( export const usePiyangoOnayValidationStore = defineStore(
'piyangoOnayValidationStore', 'piyangoOnayValidationStore',
() => { () => {
const validationStore = useValidationStore() const validationStore = useValidationStore()
const piyangoOnayStore = usePiyangoOnayStore() const piyangoOnayStore = usePiyangoOnayStore()
const piyangoDataStore = usePiyangoDataStore()
const formChanged = ref<boolean>(false) const formChanged = ref<boolean>(false)
const isFormValid = ref<boolean>(true) const isFormValid = ref<boolean>(true)
@ -15,6 +17,17 @@ export const usePiyangoOnayValidationStore = defineStore(
const isPanelFormValid = ref<boolean>(true) const isPanelFormValid = ref<boolean>(true)
const invalidTextsPanel = reactive<Record<string, any>>({}) const invalidTextsPanel = reactive<Record<string, any>>({})
const kapsamDisiId = computed<number | null>(() => {
const kapsamDisi = piyangoDataStore.piyangoOnayDurumlari.find(
(item: Record<string, any>) => item.tipAdi === 'Kapsam Dışı'
)
return kapsamDisi ? kapsamDisi.islemId : null
})
const shouldValidateIzinFields = (islemTipiId: number | null): boolean => {
return islemTipiId === 4 || islemTipiId === kapsamDisiId.value
}
const FormCheck = (): boolean => { const FormCheck = (): boolean => {
Object.assign(invalidTexts, {}) Object.assign(invalidTexts, {})
@ -24,12 +37,12 @@ export const usePiyangoOnayValidationStore = defineStore(
'onayDurumuIslemTipiId', 'onayDurumuIslemTipiId',
'Bir işlem tipi seçmelisinz.' 'Bir işlem tipi seçmelisinz.'
) )
if (piyangoOnayStore.piyangoOnayForm.onayDurumuIslemTipiId === 4) { if (shouldValidateIzinFields(piyangoOnayStore.piyangoOnayForm.onayDurumuIslemTipiId)) {
validationStore.IsFieldEmpty( validationStore.IsFieldEmpty(
piyangoOnayStore.piyangoOnayForm, piyangoOnayStore.piyangoOnayForm,
invalidTexts, invalidTexts,
'izinSayisi', 'izinSayisi',
'İzin sayı no girmelisiniz.' 'İzin sayısı girmelisiniz.'
) )
validationStore.IsFieldEmpty( validationStore.IsFieldEmpty(
piyangoOnayStore.piyangoOnayForm, piyangoOnayStore.piyangoOnayForm,
@ -38,6 +51,28 @@ export const usePiyangoOnayValidationStore = defineStore(
'İzin tarihi seçmelisiniz.' 'İzin tarihi seçmelisiniz.'
) )
} }
if (piyangoOnayStore.piyangoOnayForm.onayDurumuIslemTipiId === 4) {
validationStore.IsFieldEmpty(
piyangoOnayStore.piyangoOnayForm,
invalidTexts,
'mudurlukId',
'Müdürlük seçmelisiniz.'
)
validationStore.IsFieldEmpty(
piyangoOnayStore.piyangoOnayForm,
invalidTexts,
'cekilisGorevlisiId',
'Çekiliş görevlisi seçmelisiniz.'
)
}
if (piyangoOnayStore.piyangoOnayForm.onayDurumuIslemTipiId === kapsamDisiId.value) {
validationStore.IsFieldEmpty(
piyangoOnayStore.piyangoOnayForm,
invalidTexts,
'kapsamDisiSebebi',
'Kapsam dışı sebebi seçmelisiniz.'
)
}
isFormValid.value = Object.keys(invalidTexts).length === 0 isFormValid.value = Object.keys(invalidTexts).length === 0
return isFormValid.value return isFormValid.value
} }
@ -51,12 +86,12 @@ export const usePiyangoOnayValidationStore = defineStore(
'onayDurumuIslemTipiId', 'onayDurumuIslemTipiId',
'Bir işlem tipi seçmelisinz.' 'Bir işlem tipi seçmelisinz.'
) )
if (piyangoOnayStore.piyangoPanelOnayForm.onayDurumuIslemTipiId === 4) { if (shouldValidateIzinFields(piyangoOnayStore.piyangoPanelOnayForm.onayDurumuIslemTipiId)) {
validationStore.IsFieldEmpty( validationStore.IsFieldEmpty(
piyangoOnayStore.piyangoPanelOnayForm, piyangoOnayStore.piyangoPanelOnayForm,
invalidTextsPanel, invalidTextsPanel,
'izinSayisi', 'izinSayisi',
'İzin sayı no girmelisiniz.' 'İzin sayısı girmelisiniz.'
) )
validationStore.IsFieldEmpty( validationStore.IsFieldEmpty(
piyangoOnayStore.piyangoPanelOnayForm, piyangoOnayStore.piyangoPanelOnayForm,
@ -65,6 +100,14 @@ export const usePiyangoOnayValidationStore = defineStore(
'İzin tarihi seçmelisiniz.' 'İzin tarihi seçmelisiniz.'
) )
} }
if (piyangoOnayStore.piyangoPanelOnayForm.onayDurumuIslemTipiId === kapsamDisiId.value) {
validationStore.IsFieldEmpty(
piyangoOnayStore.piyangoPanelOnayForm,
invalidTextsPanel,
'kapsamDisiSebebi',
'Kapsam dışı sebebi seçmelisiniz.'
)
}
isPanelFormValid.value = Object.keys(invalidTextsPanel).length === 0 isPanelFormValid.value = Object.keys(invalidTextsPanel).length === 0
return isPanelFormValid.value return isPanelFormValid.value
} }

View File

@ -13,6 +13,7 @@
<tab-piyango-bilgileri v-else /> <tab-piyango-bilgileri v-else />
</template> </template>
<template #katilim-listesi><tab-piyango-katilimci-listesi /></template> <template #katilim-listesi><tab-piyango-katilimci-listesi /></template>
<template #cekilis-tutanagi><tab-piyango-cekilis-tutanagi /></template>
<template #talihliler><tab-piyango-talihli-listesi /></template> <template #talihliler><tab-piyango-talihli-listesi /></template>
<template #itiraz-sikayet><tab-piyango-itiraz /></template> <template #itiraz-sikayet><tab-piyango-itiraz /></template>
<template #piyango-loglari><tab-piyango-loglari /></template> <template #piyango-loglari><tab-piyango-loglari /></template>
@ -28,7 +29,7 @@
</template> </template>
<template <template
#dosya-kapama #dosya-kapama
v-if="usersStore.isPanelUser && piyangoStore.lotteryDrawState"> v-if="piyangoStore.lotteryApprove === 10">
<tab-piyango-dosya-kapama /> <tab-piyango-dosya-kapama />
</template> </template>
</tabs> </tabs>
@ -54,6 +55,7 @@
import TabPiyangoLoglari from '@/module/cekilisler/components/TabPiyangoLoglari.vue' import TabPiyangoLoglari from '@/module/cekilisler/components/TabPiyangoLoglari.vue'
import TabPiyangoKatilimciListesi from '@/module/cekilisler/components/TabPiyangoKatilimciListesi.vue' import TabPiyangoKatilimciListesi from '@/module/cekilisler/components/TabPiyangoKatilimciListesi.vue'
import TabPiyangoTalihliListesi from '@/module/cekilisler/components/TabPiyangoTalihliListesi.vue' import TabPiyangoTalihliListesi from '@/module/cekilisler/components/TabPiyangoTalihliListesi.vue'
import TabPiyangoCekilisTutanagi from '@/module/cekilisler/components/TabPiyangoCekilisTutanagi.vue'
import TabPiyangoBilgileri from '@/module/cekilisler/components/TabPiyangoBilgileri.vue' import TabPiyangoBilgileri from '@/module/cekilisler/components/TabPiyangoBilgileri.vue'
import TabPiyangoBilgileriDisplay from '../components/TabPiyangoBilgileriDisplay.vue' import TabPiyangoBilgileriDisplay from '../components/TabPiyangoBilgileriDisplay.vue'
import TabPiyangoItiraz from '@/module/cekilisler/components/TabPiyangoItiraz.vue' import TabPiyangoItiraz from '@/module/cekilisler/components/TabPiyangoItiraz.vue'
@ -75,11 +77,15 @@
usersStore.isPanelUser) && usersStore.isPanelUser) &&
piyangoStore.lotteryPurposeId !== 3 piyangoStore.lotteryPurposeId !== 3
) { ) {
tabList.value.push( tabList.value.push(
{ text: 'Katılım Listesi', id: 'katilim-listesi' }, { text: 'Katılım Listesi', id: 'katilim-listesi' },
{ text: 'Çekiliş Tutanağı', id: 'cekilis-tutanagi' },
{ text: 'Talihliler', id: 'talihliler' }, { text: 'Talihliler', id: 'talihliler' },
{ text: 'İtiraz/Şikayet', id: 'itiraz-sikayet' } { text: 'İtiraz/Şikayet', id: 'itiraz-sikayet' }
) )
} else {
tabList.value.push({ text: 'Çekiliş Tutanağı', id: 'cekilis-tutanagi' })
} }
if (usersStore.isPanelUser) { if (usersStore.isPanelUser) {
tabList.value.push( tabList.value.push(
@ -89,11 +95,12 @@
} }
tabList.value.push({ text: 'Onay Durumu', id: 'onay-durumu' }) tabList.value.push({ text: 'Onay Durumu', id: 'onay-durumu' })
if (piyangoStore.lotteryApprove !== 0 && piyangoStore.lotteryPurposeId !== 3) { if (piyangoStore.lotteryApprove !== 0 && piyangoStore.lotteryPurposeId !== 3) {
tabList.value.push({ text: 'Teminat Listesi', id: 'teminat-listesi' }) tabList.value.push({ text: 'Teminat Listesi', id: 'teminat-listesi' })
} }
if (usersStore.isPanelUser && piyangoStore.lotteryDrawState) { if (piyangoStore.lotteryApprove === 10) {
tabList.value.push({ text: 'Dosya Kapama', id: 'dosya-kapama' }) tabList.value.push({ text: 'Dosya Kapama', id: 'dosya-kapama' })
} }
} }

View File

@ -1,6 +1,6 @@
<template> <template>
<AdminLayout> <AdminLayout>
<Breadcrumb currentPageText="Piyango Listesi" go="/"/> <Breadcrumb currentPageText="Piyango Listesi" go="/" />
<div <div
class="form-inner-comment waiting-d" class="form-inner-comment waiting-d"
v-if="!usersStore.isPanelUser && usersStore.userApproveId !== 4"> v-if="!usersStore.isPanelUser && usersStore.userApproveId !== 4">
@ -18,13 +18,12 @@
:addRoute="addApiControl" :addRoute="addApiControl"
:apiList="apiList" :apiList="apiList"
apiText="Piyango Listesi" apiText="Piyango Listesi"
isUseRoute/> isUseRoute />
</section> </section>
</AdminLayout> </AdminLayout>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref, computed, onBeforeMount, onMounted } from 'vue' import { ref, computed, onBeforeMount } from 'vue'
import { useRoute } from 'vue-router'
import AdminLayout from '@/layouts/AdminLayout.vue' import AdminLayout from '@/layouts/AdminLayout.vue'
import { useDateStore } from '@/stores/dateStore' import { useDateStore } from '@/stores/dateStore'
@ -32,6 +31,8 @@
const dateStore = useDateStore() const dateStore = useDateStore()
import { useUsersStore } from '@/stores/usersStore' import { useUsersStore } from '@/stores/usersStore'
const usersStore = useUsersStore() const usersStore = useUsersStore()
import { useGlobalStore } from '@/stores/globalStore'
const globalStore = useGlobalStore()
import { usePiyangoStore } from '../stores/piyangoStore' import { usePiyangoStore } from '../stores/piyangoStore'
const piyangoStore = usePiyangoStore() const piyangoStore = usePiyangoStore()
import { usePiyangoDataStore } from '../stores/piyangoDataStore' import { usePiyangoDataStore } from '../stores/piyangoDataStore'
@ -40,7 +41,6 @@
const piyangoServices = usePiyangoServices() const piyangoServices = usePiyangoServices()
import router from '@/router' import router from '@/router'
const route = useRoute()
const loaded = ref<boolean>(false) const loaded = ref<boolean>(false)
const apiList = ref<string>('') const apiList = ref<string>('')
@ -70,26 +70,28 @@
const tableHeader = computed<Record<string, any>[]>(() => { const tableHeader = computed<Record<string, any>[]>(() => {
let header: Record<string, any>[] = [] let header: Record<string, any>[] = []
// 1. PİYANGO ID
header.push({ header.push({
name: 'piyangoId', name: 'piyangoId',
title: 'Piyango Id', title: 'Piyango ID',
sort: true, sort: true,
style: { width: '10%' } style: { width: '10%' }
}) })
// 2. MÜDÜRLÜK
if (usersStore.isAraciFirma || usersStore.isPanelUser) { header.push({
header.push({ name: 'duzenleyen', title: 'Düzenleyen' }) name: 'mudurluk',
} title: 'Müdürlük',
compute: (v: Record<string, any>): string => {
header.push( return v.mudurluk || ''
{
name: 'baslik',
title: 'Başlık',
sort: true,
style: { width: '15%' }
}, },
{ filter: {
type: 'text'
}
})
// 3. PİYANGO AMACI
header.push({
name: 'piyangoamac', name: 'piyangoamac',
title: 'Piyango Amacı', title: 'Piyango Amacı',
sort: true, sort: true,
@ -100,87 +102,38 @@
listText: 'amacAdi', listText: 'amacAdi',
filterId: 'piyangoAmacId' filterId: 'piyangoAmacId'
} }
}, })
{
name: 'olusturmaTarihi',
title: 'Oluşturulma Tarihi',
compute: (v: Record<string, any>): string => {
return dateStore.dateFormat({ date: v.olusturmaTarihi })
},
sort: true,
filter: {
type: 'date',
range: true
}
}
)
if (usersStore.isVakifDernek || usersStore.isPanelUser) { // 4. DÜZENLEYEN (koşullu)
if (usersStore.isAraciFirma || usersStore.isPanelUser) {
header.push({ header.push({
name: 'cekilisTarihi', name: 'duzenleyen',
title: 'Çekiliş Tarihi', title: 'Düzenleyen',
compute: (v: Record<string, any>): string => {
if(v.piyangoAmacId === 3) return ''
else return dateStore.dateFormat({ date: v.cekilisTarihi })
},
sort: true,
filter: { filter: {
type: 'date', type: 'text'
range: true
} }
}) })
} }
if (!usersStore.isVakifDernek || usersStore.isPanelUser) {
header.push(
{
name: 'baslangicTarihi',
title: 'Başlangıç Tarihi',
compute: (v: Record<string, any>): string => {
if (v.baslangicTarihi.includes('0001-')) return ''
else return dateStore.dateFormat({ date: v.baslangicTarihi })
},
sort: true,
filter: {
type: 'date',
range: true
}
},
{
name: 'bitisTarihi',
title: 'Bitis Tarihi',
compute: (v: Record<string, any>): string => {
if (v.bitisTarihi.includes('0001-')) return ''
else return dateStore.dateFormat({ date: v.bitisTarihi })
},
sort: true,
filter: {
type: 'date',
range: true
}
}
)
}
header.push( // 5. ARACI FİRMA
{ header.push({
name: 'cekilisYontemi', name: 'araciFirma',
title: 'Çekiliş Yöntemi', title: 'Araci Firma',
sort: true, compute: (v: Record<string, any>): string => {
filter: { return v.araciFirma || ''
type: 'select',
data: cekilisYontemleri.value,
listVal: 'id',
listText: 'deger',
filterId: 'cekilisYontemiId'
}
}, },
{ name: 'ikramiyeler', title: 'İkramiyeler', style: { width: '15%' } }, filter: {
{ type: 'text'
}
})
// 6. DURUM
header.push({
name: 'durum', name: 'durum',
title: 'Durum', title: 'Durum',
style: { width: '10%' }, style: { width: '10%' },
computeHtml: (v: Record<string, any>): string => { computeHtml: (v: Record<string, any>): string => {
return `<span class="back-grad ${piyangoStore.LoterryStatusClass(v.durum)}"> return `<span class="${piyangoStore.LoterryStatusClass(v.durum)}">
${v.durum} ${v.durum}
</span>` </span>`
}, },
@ -191,8 +144,223 @@
listText: 'tipAdi', listText: 'tipAdi',
filterId: 'durumId' filterId: 'durumId'
} }
})
// 7. İZİN TARİHİ
header.push({
name: 'izinTarihi',
title: 'İzin Tarihi',
compute: (v: Record<string, any>): string => {
if (!v.izinTarihi || v.izinTarihi === null) return ''
return dateStore.dateFormat({ date: v.izinTarihi })
},
sort: true,
filter: {
type: 'date',
between: true
} }
) })
// 8. İZİN SAYISI
header.push({
name: 'izinSayisi',
title: 'İzin Sayısı',
compute: (v: Record<string, any>): string => {
return v.izinSayisi || ''
},
sort: true,
filter: {
type: 'text',
range: true
}
})
// 9. BAŞLANGIÇ TARİHİ
header.push({
name: 'baslangicTarihi',
title: 'Başlangıç Tarihi',
compute: (v: Record<string, any>): string => {
if (!v.baslangicTarihi || v.baslangicTarihi.includes('0001-')) return ''
return dateStore.dateFormat({ date: v.baslangicTarihi })
},
sort: true,
filter: {
type: 'date',
between: true
}
})
// 10. BİTİŞ TARİHİ
header.push({
name: 'bitisTarihi',
title: 'Bitiş Tarihi',
compute: (v: Record<string, any>): string => {
if (!v.bitisTarihi || v.bitisTarihi.includes('0001-')) return ''
return dateStore.dateFormat({ date: v.bitisTarihi })
},
sort: true,
filter: {
type: 'date',
between: true
}
})
// 11. ÇEKİLİŞ TARİHİ
header.push({
name: 'cekilisTarihi',
title: 'Çekiliş Tarihi',
compute: (v: Record<string, any>): string => {
if (!v.cekilisTarihi || v.cekilisTarihi.includes('0001-')) return ''
if (v.piyangoAmacId === 3) return ''
return dateStore.dateFormat({ date: v.cekilisTarihi })
},
sort: true,
filter: {
type: 'date',
between: true
}
})
// 12. ÇEKİLİŞ GÖREVLİSİ
header.push({
name: 'cekilisGorevlisi',
title: 'Çekiliş Görevlisi',
compute: (v: Record<string, any>): string => {
return v.cekilisGorevlisi || ''
},
filter: {
type: 'text'
}
})
// 13. GAZETE İLAN TARİHİ
header.push({
name: 'gazeteIlanTarihi',
title: 'Gazete İlan Tarihi',
compute: (v: Record<string, any>): string => {
if (!v.gazeteIlanTarihi || v.gazeteIlanTarihi === null) return ''
return dateStore.dateFormat({ date: v.gazeteIlanTarihi })
},
sort: true,
filter: {
type: 'date',
between: true
}
})
// 14. GAZETE ADI
header.push({
name: 'gazeteAdi',
title: 'Gazete Adı',
compute: (v: Record<string, any>): string => {
return v.gazeteAdi || ''
}
})
// 15. İZİN BEDELİ
header.push({
name: 'izinBedeliTutari',
title: 'İzin Bedeli',
compute: (v: Record<string, any>): string => {
if (v.izinBedeliTutari === null || v.izinBedeliTutari === undefined) return ''
return globalStore.toTrLocale(v.izinBedeliTutari)
},
sort: true
})
// 16. İKRAMİYE TUTARI
header.push({
name: 'ikramiyeTutari',
title: 'İkramiye Tutarı',
compute: (v: Record<string, any>): string => {
if (v.ikramiyeTutari === null || v.ikramiyeTutari === undefined) return ''
return globalStore.toTrLocale(v.ikramiyeTutari)
},
sort: true
})
// 17. TEMİNAT TARİHİ
header.push({
name: 'teminatTarihi',
title: 'Teminat Tarihi',
compute: (v: Record<string, any>): string => {
if (!v.teminatTarihi || v.teminatTarihi === null) return ''
return dateStore.dateFormat({ date: v.teminatTarihi })
},
sort: true
})
// 18. TEMİNAT SAYISI
header.push({
name: 'teminatSayisi',
title: 'Teminat Sayısı',
compute: (v: Record<string, any>): string => {
return v.teminatSayisi || ''
},
sort: true
})
// 19. TEMİNAT BANKASI
header.push({
name: 'teminatBankasi',
title: 'Teminat Bankası',
compute: (v: Record<string, any>): string => {
return v.teminatBankasi || ''
}
})
// 20. TEMİNAT TUTARI
header.push({
name: 'teminatTutari',
title: 'Teminat Tutarı',
compute: (v: Record<string, any>): string => {
if (v.teminatTutari === null || v.teminatTutari === undefined) return ''
return globalStore.toTrLocale(v.teminatTutari)
},
sort: true
})
// 21. T. PARA CİNSİ
header.push({
name: 'paraBirimiSembol',
title: 'T. Para Cinsi',
compute: (v: Record<string, any>): string => {
return v.paraBirimiSembol || ''
}
})
// 22. T. İADE TARİHİ
header.push({
name: 'teminatIadeTarihi',
title: 'T. İade Tarihi',
compute: (v: Record<string, any>): string => {
if (!v.teminatIadeTarihi || v.teminatIadeTarihi === null) return ''
return dateStore.dateFormat({ date: v.teminatIadeTarihi })
},
sort: true
})
// 23. T. İADE SAYISI
header.push({
name: 'teminatIadeSayisi',
title: 'T. İade Sayısı',
compute: (v: Record<string, any>): string => {
return v.teminatIadeSayisi || ''
},
sort: true
})
// 24. İKRAMİYELER
header.push({
name: 'ikramiyeler',
title: 'İkramiyeler',
style: { width: '15%' },
compute: (v: Record<string, any>): string => {
return v.ikramiyeler || ''
}
})
// Panel User için ek sütunlar
if (usersStore.isPanelUser) { if (usersStore.isPanelUser) {
header.push({ header.push({
name: 'atanmis', name: 'atanmis',
@ -208,9 +376,7 @@
} }
} }
}) })
}
if (usersStore.isPanelUser) {
header.push({ header.push({
name: 'basvuruBedelNo', name: 'basvuruBedelNo',
title: 'Muhasebeleştirme Durumu', title: 'Muhasebeleştirme Durumu',
@ -228,12 +394,13 @@
} }
}) })
} }
return header return header
}) })
// tablodan herhangi bir satır tıklayınca çalısır // tablodan herhangi bir satır tıklayınca çalısır
const OpenPiyango = (row: any) => { const OpenPiyango = (row: any) => {
router.push('detay/' + row.id+'/piyango-bilgileri') router.push('detay/' + row.id + '/piyango-bilgileri')
} }
onBeforeMount(async () => { onBeforeMount(async () => {
@ -243,13 +410,4 @@
loaded.value = true loaded.value = true
}) })
onMounted(() => {
// URL query parametrelerini kontrol et ve filtreleri uygula
if (route.query.durumId) {
// Filtre parametresini ListTableContent bileşenine iletmek için
// Bu parametre otomatik olarak ListTableContent tarafından işlenecek
console.log('Durum filtresi uygulanıyor:', route.query.durumId)
}
})
</script> </script>

View File

@ -78,7 +78,7 @@
sort: true, sort: true,
filter: { filter: {
type: 'date', type: 'date',
range: true between: true
} }
}, },
{ {
@ -90,7 +90,7 @@
sort: true, sort: true,
filter: { filter: {
type: 'date', type: 'date',
range: true between: true
} }
}, },
{ {
@ -102,7 +102,7 @@
sort: true, sort: true,
filter: { filter: {
type: 'date', type: 'date',
range: true between: true
} }
}, },
{ {
@ -114,7 +114,7 @@
sort: true, sort: true,
filter: { filter: {
type: 'date', type: 'date',
range: true between: true
} }
}, },
{ {
@ -134,7 +134,7 @@
name: 'durum', name: 'durum',
title: 'Durum', title: 'Durum',
computeHtml: (v: Record<string, any>): string => { computeHtml: (v: Record<string, any>): string => {
return `<span class='back-grad ${piyangoStore.LoterryStatusClass(v.durum)}'> return `<span class='${piyangoStore.LoterryStatusClass(v.durum)}'>
${v.durum} ${v.durum}
</span>` </span>`
}, },

View File

@ -217,7 +217,6 @@
} }
} }
const GetIkramiyeTotalValues = async () => { const GetIkramiyeTotalValues = async () => {
console.log(piyangoStore, 'piyangoStore')
let data = await dataStore.dataGet('Ikramiye/Cekilis/' + piyangoStore.selectedLottery +'?pageNumber=0') let data = await dataStore.dataGet('Ikramiye/Cekilis/' + piyangoStore.selectedLottery +'?pageNumber=0')
//todo:page 0 //todo:page 0
if (data !== 'errorfalse') { if (data !== 'errorfalse') {
@ -281,7 +280,6 @@
}) })
} }
const BasvuruBedeliMuhasebelestir = async () => { const BasvuruBedeliMuhasebelestir = async () => {
console.log('basvuru bedeli muhasebelestir')
let data = await dataStore.dataGet( let data = await dataStore.dataGet(
'MuhasebeSettings/BasvuruBedeli/' + piyangoStore.selectedLottery 'MuhasebeSettings/BasvuruBedeli/' + piyangoStore.selectedLottery
) )

View File

@ -24,6 +24,8 @@
const dateStore = useDateStore() const dateStore = useDateStore()
import { useUsersStore } from '@/stores/usersStore' import { useUsersStore } from '@/stores/usersStore'
const usersStore = useUsersStore() const usersStore = useUsersStore()
import { useGlobalStore } from '@/stores/globalStore'
const globalStore = useGlobalStore()
import { usePiyangoStore } from '@/module/cekilisler/stores/piyangoStore' import { usePiyangoStore } from '@/module/cekilisler/stores/piyangoStore'
const piyangoStore = usePiyangoStore() const piyangoStore = usePiyangoStore()
import { usePiyangoDataStore } from '@/module/cekilisler/stores/piyangoDataStore' import { usePiyangoDataStore } from '@/module/cekilisler/stores/piyangoDataStore'
@ -50,24 +52,25 @@
const tableHeader = computed<Record<string, any>[]>(() => { const tableHeader = computed<Record<string, any>[]>(() => {
let header: Record<string, any>[] = [] let header: Record<string, any>[] = []
if (usersStore.isAraciFirma || usersStore.isPanelUser) { // 1. PİYANGO ID
header.push({ name: 'duzenleyen', title: 'Düzenleyen' }) header.push({
}
header.push(
{
name: 'piyangoId', name: 'piyangoId',
title: 'Piyango ID', title: 'Piyango ID',
sort: true, sort: true,
style: { width: '10%' } style: { width: '10%' }
}, })
{
name: 'baslik', // 2. MÜDÜRLÜK
title: 'Başlık', header.push({
sort: true, name: 'mudurluk',
style: { width: '15%' } title: 'Müdürlük',
}, compute: (v: Record<string, any>): string => {
{ return v.mudurluk || ''
}
})
// 3. PİYANGO AMACI
header.push({
name: 'piyangoamac', name: 'piyangoamac',
title: 'Piyango Amacı', title: 'Piyango Amacı',
sort: true, sort: true,
@ -78,86 +81,29 @@
listText: 'amacAdi', listText: 'amacAdi',
filterId: 'piyangoAmacId' filterId: 'piyangoAmacId'
} }
}, })
{
name: 'olusturmaTarihi',
title: 'Oluşturulma Tarihi',
compute: (v: Record<string, any>): string => {
return dateStore.dateFormat({ date: v.olusturmaTarihi })
},
sort: true,
filter: {
type: 'date',
range: true
}
}
)
if (usersStore.isVakifDernek || usersStore.isPanelUser) { // 4. DÜZENLEYEN (koşullu)
if (usersStore.isAraciFirma || usersStore.isPanelUser) {
header.push({ name: 'duzenleyen', title: 'Düzenleyen' })
}
// 5. ARACI FİRMA
header.push({ header.push({
name: 'cekilisTarihi', name: 'araciFirma',
title: 'Çekiliş Tarihi', title: 'Araci Firma',
compute: (v: Record<string, any>): string => { compute: (v: Record<string, any>): string => {
return dateStore.dateFormat({ date: v.cekilisTarihi }) return v.araciFirma || ''
},
sort: true,
filter: {
type: 'date',
range: true
} }
}) })
}
if (!usersStore.isVakifDernek || usersStore.isPanelUser) {
header.push(
{
name: 'baslangicTarihi',
title: 'Başlangıç Tarihi',
compute: (v: Record<string, any>): string => {
if (v.baslangicTarihi.includes('0001-')) return ''
else return dateStore.dateFormat({ date: v.baslangicTarihi })
},
sort: true,
filter: {
type: 'date',
range: true
}
},
{
name: 'bitisTarihi',
title: 'Bitis Tarihi',
compute: (v: Record<string, any>): string => {
if (v.bitisTarihi.includes('0001-')) return ''
else return dateStore.dateFormat({ date: v.bitisTarihi })
},
sort: true,
filter: {
type: 'date',
range: true
}
}
)
}
header.push( // 6. DURUM
{ header.push({
name: 'cekilisYontemi',
title: 'Çekiliş Yöntemi',
sort: true,
filter: {
type: 'select',
data: cekilisYontemleri.value,
listVal: 'id',
listText: 'deger',
filterId: 'cekilisYontemiId'
}
},
{ name: 'ikramiyeler', title: 'İkramiyeler', style: { width: '15%' } },
{
name: 'durum', name: 'durum',
title: 'Durum', title: 'Durum',
style: { width: '10%' }, style: { width: '10%' },
computeHtml: (v: Record<string, any>): string => { computeHtml: (v: Record<string, any>): string => {
return `<span class="back-grad ${piyangoStore.LoterryStatusClass(v.durum)}"> return `<span class="${piyangoStore.LoterryStatusClass(v.durum)}">
${v.durum} ${v.durum}
</span>` </span>`
}, },
@ -168,8 +114,217 @@
listText: 'tipAdi', listText: 'tipAdi',
filterId: 'durumId' filterId: 'durumId'
} }
})
// 7. İZİN TARİHİ
header.push({
name: 'izinTarihi',
title: 'İzin Tarihi',
compute: (v: Record<string, any>): string => {
if (!v.izinTarihi || v.izinTarihi === null) return ''
return dateStore.dateFormat({ date: v.izinTarihi })
}, },
{ sort: true,
filter: {
type: 'date',
between: true
}
})
// 8. İZİN SAYISI
header.push({
name: 'izinSayisi',
title: 'İzin Sayısı',
compute: (v: Record<string, any>): string => {
return v.izinSayisi || ''
},
sort: true
})
// 9. BAŞLANGIÇ TARİHİ
header.push({
name: 'baslangicTarihi',
title: 'Başlangıç Tarihi',
compute: (v: Record<string, any>): string => {
if (!v.baslangicTarihi || v.baslangicTarihi.includes('0001-')) return ''
return dateStore.dateFormat({ date: v.baslangicTarihi })
},
sort: true,
filter: {
type: 'date',
between: true
}
})
// 10. BİTİŞ TARİHİ
header.push({
name: 'bitisTarihi',
title: 'Bitiş Tarihi',
compute: (v: Record<string, any>): string => {
if (!v.bitisTarihi || v.bitisTarihi.includes('0001-')) return ''
return dateStore.dateFormat({ date: v.bitisTarihi })
},
sort: true,
filter: {
type: 'date',
between: true
}
})
// 11. ÇEKİLİŞ TARİHİ
header.push({
name: 'cekilisTarihi',
title: 'Çekiliş Tarihi',
compute: (v: Record<string, any>): string => {
if (!v.cekilisTarihi || v.cekilisTarihi.includes('0001-')) return ''
if (v.piyangoAmacId === 3) return ''
return dateStore.dateFormat({ date: v.cekilisTarihi })
},
sort: true,
filter: {
type: 'date',
between: true
}
})
// 12. ÇEKİLİŞ GÖREVLİSİ
header.push({
name: 'cekilisGorevlisi',
title: 'Çekiliş Görevlisi',
compute: (v: Record<string, any>): string => {
return v.cekilisGorevlisi || ''
}
})
// 13. GAZETE İLAN TARİHİ
header.push({
name: 'gazeteIlanTarihi',
title: 'Gazete İlan Tarihi',
compute: (v: Record<string, any>): string => {
if (!v.gazeteIlanTarihi || v.gazeteIlanTarihi === null) return ''
return dateStore.dateFormat({ date: v.gazeteIlanTarihi })
},
sort: true,
filter: {
type: 'date',
between: true
}
})
// 14. GAZETE ADI
header.push({
name: 'gazeteAdi',
title: 'Gazete Adı',
compute: (v: Record<string, any>): string => {
return v.gazeteAdi || ''
}
})
// 15. İZİN BEDELİ
header.push({
name: 'izinBedeliTutari',
title: 'İzin Bedeli',
compute: (v: Record<string, any>): string => {
if (v.izinBedeliTutari === null || v.izinBedeliTutari === undefined) return ''
return globalStore.toTrLocale(v.izinBedeliTutari)
},
sort: true
})
// 16. İKRAMİYE TUTARI
header.push({
name: 'ikramiyeTutari',
title: 'İkramiye Tutarı',
compute: (v: Record<string, any>): string => {
if (v.ikramiyeTutari === null || v.ikramiyeTutari === undefined) return ''
return globalStore.toTrLocale(v.ikramiyeTutari)
},
sort: true
})
// 17. TEMİNAT TARİHİ
header.push({
name: 'teminatTarihi',
title: 'Teminat Tarihi',
compute: (v: Record<string, any>): string => {
if (!v.teminatTarihi || v.teminatTarihi === null) return ''
return dateStore.dateFormat({ date: v.teminatTarihi })
},
sort: true
})
// 18. TEMİNAT SAYISI
header.push({
name: 'teminatSayisi',
title: 'Teminat Sayısı',
compute: (v: Record<string, any>): string => {
return v.teminatSayisi || ''
},
sort: true
})
// 19. TEMİNAT BANKASI
header.push({
name: 'teminatBankasi',
title: 'Teminat Bankası',
compute: (v: Record<string, any>): string => {
return v.teminatBankasi || ''
}
})
// 20. TEMİNAT TUTARI
header.push({
name: 'teminatTutari',
title: 'Teminat Tutarı',
compute: (v: Record<string, any>): string => {
if (v.teminatTutari === null || v.teminatTutari === undefined) return ''
return globalStore.toTrLocale(v.teminatTutari)
},
sort: true
})
// 21. T. PARA CİNSİ
header.push({
name: 'paraBirimiSembol',
title: 'T. Para Cinsi',
compute: (v: Record<string, any>): string => {
return v.paraBirimiSembol || ''
}
})
// 22. T. İADE TARİHİ
header.push({
name: 'teminatIadeTarihi',
title: 'T. İade Tarihi',
compute: (v: Record<string, any>): string => {
if (!v.teminatIadeTarihi || v.teminatIadeTarihi === null) return ''
return dateStore.dateFormat({ date: v.teminatIadeTarihi })
},
sort: true
})
// 23. T. İADE SAYISI
header.push({
name: 'teminatIadeSayisi',
title: 'T. İade Sayısı',
compute: (v: Record<string, any>): string => {
return v.teminatIadeSayisi || ''
},
sort: true
})
// 24. İKRAMİYELER
header.push({
name: 'ikramiyeler',
title: 'İkramiyeler',
style: { width: '15%' },
compute: (v: Record<string, any>): string => {
return v.ikramiyeler || ''
}
})
// Muhasebe özel sütunlar
header.push({
name: 'atanmis', name: 'atanmis',
title: 'Sevk Durumu', title: 'Sevk Durumu',
computeHtml: (v: Record<string, any>): string => { computeHtml: (v: Record<string, any>): string => {
@ -182,8 +337,9 @@
Sevk Edilmemiş</span>` Sevk Edilmemiş</span>`
} }
} }
}, })
{
header.push({
name: 'basvuruBedelNo', name: 'basvuruBedelNo',
title: 'Muhasebeleştirme Durumu', title: 'Muhasebeleştirme Durumu',
computeHtml: (v: Record<string, any>): string => { computeHtml: (v: Record<string, any>): string => {
@ -198,8 +354,8 @@
} }
return durum return durum
} }
} })
)
return header return header
}) })

View File

@ -153,10 +153,7 @@
} }
const loadSliders = async () => { const loadSliders = async () => {
const data = await dataStore.dataGet('Slider') const data = await dataStore.dataGet('Slider')
console.log('apidata', data)
sliders.value = data sliders.value = data
console.log(sliders.value)
} }
const save = async () => { const save = async () => {

View File

@ -86,7 +86,7 @@
sort: true, sort: true,
filter: { filter: {
type: 'date', type: 'date',
range: true between: true
} }
}, },
{ {
@ -98,7 +98,7 @@
sort: true, sort: true,
filter: { filter: {
type: 'date', type: 'date',
range: true between: true
} }
}, },
{ {
@ -110,7 +110,7 @@
sort: true, sort: true,
filter: { filter: {
type: 'date', type: 'date',
range: true between: true
} }
}, },
{ {
@ -122,7 +122,7 @@
sort: true, sort: true,
filter: { filter: {
type: 'date', type: 'date',
range: true between: true
} }
}, },
{ {
@ -143,7 +143,7 @@
title: 'Durum', title: 'Durum',
style: { width: '10%' }, style: { width: '10%' },
computeHtml: (v: Record<string, any>): string => { computeHtml: (v: Record<string, any>): string => {
return `<span class='back-grad ${piyangoStore.LoterryStatusClass(v.durum)}'> return `<span class='${piyangoStore.LoterryStatusClass(v.durum)}'>
${v.durum} ${v.durum}
</span>` </span>`
}, },

View File

@ -66,7 +66,7 @@
}, },
filter: { filter: {
type: 'date', type: 'date',
range: true between: true
}, },
style: { width: '10%' } style: { width: '10%' }
}, },

View File

@ -51,12 +51,12 @@
sort: true, sort: true,
filter: { filter: {
type: 'date', type: 'date',
range: true between: true
}, },
style:{width:'15%'} style:{width:'15%'}
}, },
{ {
name: 'kisiAdi', name: 'email',
title: 'Kişi', title: 'Kişi',
sort: true, sort: true,
style:{width:'20%'} style:{width:'20%'}

View File

@ -7,6 +7,9 @@
<template #kisi-kurum-bilgileri> <template #kisi-kurum-bilgileri>
<tab-yetkili-uye-bilgileri /> <tab-yetkili-uye-bilgileri />
</template> </template>
<template #piyangolar>
<tab-uye-piyangolar />
</template>
<template #onay-durumu> <template #onay-durumu>
<tab-uye-onay-durumu v-if="usersStore.isPanelUser" /> <tab-uye-onay-durumu v-if="usersStore.isPanelUser" />
<tab-uye-onay-durumu-user v-else /> <tab-uye-onay-durumu-user v-else />
@ -25,6 +28,7 @@
import AdminLayout from '@/layouts/AdminLayout.vue' import AdminLayout from '@/layouts/AdminLayout.vue'
import TabYetkiliUyeBilgileri from '../components/TabYetkiliUyeBilgileri.vue' import TabYetkiliUyeBilgileri from '../components/TabYetkiliUyeBilgileri.vue'
import TabUyePiyangolar from '../components/TabUyePiyangolar.vue'
import TabUyeOnayDurumu from '../components/TabUyeOnayDurumu.vue' import TabUyeOnayDurumu from '../components/TabUyeOnayDurumu.vue'
import TabUyeOnayDurumuUser from '../components/TabUyeOnayDurumuUser.vue' import TabUyeOnayDurumuUser from '../components/TabUyeOnayDurumuUser.vue'
@ -32,6 +36,11 @@
const tabList = ref<Record<string, any>[]>([ const tabList = ref<Record<string, any>[]>([
{ text: 'Kişi/Kurum Bilgileri', id: 'kisi-kurum-bilgileri' } { text: 'Kişi/Kurum Bilgileri', id: 'kisi-kurum-bilgileri' }
]) ])
if (usersStore.isPanelUser || usersStore.isAraciFirma) {
tabList.value.push({ text: 'Piyangolar', id: 'piyangolar' })
}
tabList.value.push({ text: 'Onay Durumu', id: 'onay-durumu' }) tabList.value.push({ text: 'Onay Durumu', id: 'onay-durumu' })
onBeforeMount(async () => { onBeforeMount(async () => {

View File

@ -63,7 +63,7 @@
}, },
filter: { filter: {
type: 'date', type: 'date',
range: true between: true
}, },
style: { width: '10%' } style: { width: '10%' }
}, },

View File

@ -39,7 +39,7 @@ router.beforeEach((to, from) => {
const usersStore = useUsersStore() const usersStore = useUsersStore()
if (to.meta.authRequired && !usersStore.userIsAuth && from.name !== 'Login') { if (to.meta.authRequired && !usersStore.userIsAuth && from.name !== 'Login') {
router.push('/giris') router.push('/login')
} }
}) })

View File

@ -35,13 +35,14 @@ export const useDataStore = defineStore('dataStore', () => {
if (data.data !== undefined) sendData.data = data.data if (data.data !== undefined) sendData.data = data.data
if (data.params !== undefined) sendData.params = data.params if (data.params !== undefined) sendData.params = data.params
if (data.headers !== undefined) sendData.headers = data.headers if (data.headers !== undefined) sendData.headers = data.headers
if (data.toast !== undefined) {
toastStore.AddToast(data.toast.toast, data.toast.type, data.toast.timeout)
}
const response = await axios.get(apiBase.value + api, sendData) const response = await axios.get(apiBase.value + api, sendData)
console.log('response --', api, response) console.log('response --', api, response)
if (data.toast !== undefined) {
toastStore.AddToast(data.toast.toast, data.toast.type, data.toast.timeout)
}
if (data.full !== undefined && data.full) { if (data.full !== undefined && data.full) {
return response return response
} else { } else {
@ -72,12 +73,13 @@ export const useDataStore = defineStore('dataStore', () => {
if (data.options !== undefined) Object.assign(sendData, data.options) if (data.options !== undefined) Object.assign(sendData, data.options)
if (data.params !== undefined) sendData.params = data.params if (data.params !== undefined) sendData.params = data.params
if (data.headers !== undefined) sendData.headers = data.headers if (data.headers !== undefined) sendData.headers = data.headers
const response = await axios.post(apiBase.value + api, postData, sendData)
if (data.toast !== undefined) { if (data.toast !== undefined) {
toastStore.AddToast(data.toast.toast, data.toast.type, data.toast.timeout) toastStore.AddToast(data.toast.toast, data.toast.type, data.toast.timeout)
} }
const response = await axios.post(apiBase.value + api, postData, sendData)
if (data.full !== undefined && data.full) { if (data.full !== undefined && data.full) {
return response return response
} else { } else {
@ -109,11 +111,13 @@ export const useDataStore = defineStore('dataStore', () => {
if (data.options !== undefined) Object.assign(sendData, data.options) if (data.options !== undefined) Object.assign(sendData, data.options)
if (data.params !== undefined) sendData.params = data.params if (data.params !== undefined) sendData.params = data.params
if (data.headers !== undefined) sendData.headers = data.headers if (data.headers !== undefined) sendData.headers = data.headers
const response = await axios.put(apiBase.value + api, postData, sendData)
if (data.toast !== undefined) { if (data.toast !== undefined) {
toastStore.AddToast(data.toast.toast, data.toast.type, data.toast.timeout) toastStore.AddToast(data.toast.toast, data.toast.type, data.toast.timeout)
} }
const response = await axios.put(apiBase.value + api, postData, sendData)
if (data.full !== undefined && data.full) { if (data.full !== undefined && data.full) {
return response return response
} else { } else {
@ -144,11 +148,13 @@ export const useDataStore = defineStore('dataStore', () => {
if (data.options !== undefined) Object.assign(sendData, data.options) if (data.options !== undefined) Object.assign(sendData, data.options)
if (data.params !== undefined) sendData.params = data.params if (data.params !== undefined) sendData.params = data.params
if (data.headers !== undefined) sendData.headers = data.headers if (data.headers !== undefined) sendData.headers = data.headers
const response = await axios.delete(apiBase.value + api, sendData)
if (data.toast !== undefined) { if (data.toast !== undefined) {
toastStore.AddToast(data.toast.toast, data.toast.type, data.toast.timeout) toastStore.AddToast(data.toast.toast, data.toast.type, data.toast.timeout)
} }
const response = await axios.delete(apiBase.value + api, sendData)
if (data.full !== undefined && data.full) { if (data.full !== undefined && data.full) {
return response return response
} else { } else {

View File

@ -1,6 +1,6 @@
{ {
"extends": "@vue/tsconfig/tsconfig.dom.json", "extends": "@vue/tsconfig/tsconfig.dom.json",
"include": ["env.d.ts", "src/**/*", "src/**/*.vue"], "include": ["env.d.ts", "src/**/*", "src/**/*.vue", "Configs.ts"],
"exclude": ["src/**/__tests__/*"], "exclude": ["src/**/__tests__/*"],
"compilerOptions": { "compilerOptions": {
"composite": true, "composite": true,

View File

@ -1,11 +1,12 @@
{ {
"extends": "@tsconfig/node20/tsconfig.json", "extends": "./tsconfig.json",
"include": [ "include": [
"vite.config.*", "vite.config.*",
"vitest.config.*", "vitest.config.*",
"cypress.config.*", "cypress.config.*",
"nightwatch.conf.*", "nightwatch.conf.*",
"playwright.config.*" "playwright.config.*",
"Configs.ts"
], ],
"compilerOptions": { "compilerOptions": {
"composite": true, "composite": true,

View File

@ -3,6 +3,7 @@ import { fileURLToPath, URL } from 'node:url'
import { defineConfig } from 'vite' import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue' import vue from '@vitejs/plugin-vue'
import vueJsx from '@vitejs/plugin-vue-jsx' import vueJsx from '@vitejs/plugin-vue-jsx'
import { SetTemplateGroup } from './Configs.js'
// https://vitejs.dev/config/ // https://vitejs.dev/config/
export default defineConfig({ export default defineConfig({
@ -23,5 +24,46 @@ export default defineConfig({
}, },
esbuild: { esbuild: {
drop: process.env.NODE_ENV === 'production' ? ['console', 'debugger'] : [] drop: process.env.NODE_ENV === 'production' ? ['console', 'debugger'] : []
},
build: {
rollupOptions: {
output: {
manualChunks(id) {
if (id.includes('/src/')) {
const group = SetTemplateGroup(id)
if (group) return `grp_${group}` // group files
}
// jquery files
if (id.includes('node_modules/jquery')) return 'ven_jquery'
if (id.includes('node_modules/summernote')) return 'ven_summer'
if (id.includes('node_modules/pdfmake')) return 'ven_pdfmake'
if (id.includes('node_modules/html-to-pdfmake')) return 'ven_pdfmake'
if (id.includes('node_modules/vue3-pdfmake')) return 'ven_pdfmake'
// other node_modules files
if (id.includes('node_modules')) return 'vendor'
},
assetFileNames: (assetInfo) => {
const name = assetInfo.names?.[0] || assetInfo.name || ''
if (name.endsWith('.css')) {
return 'static/css/[name]-[hash][extname]'
}
if (/\.(png|jpe?g|svg|gif|webp|ico)$/i.test(name)) {
return 'static/images/[name]-[hash][extname]'
}
if (/\.(ttf|woff2?|eot|otf)$/i.test(name)) {
return 'static/fonts/[name]-[hash][extname]'
}
return 'static/[name]-[hash][extname]'
},
chunkFileNames: (chunkInfo) => {
if (chunkInfo.name?.startsWith('grp_')) return 'static/js/[name]-[hash].js'
return 'static/js/[name]-[hash].js'
},
entryFileNames: 'static/js/[name]-[hash].js'
}
}
} }
}) })