Merge pull request 'upd: api pelayanan' (#72) from amalia/10-des-25 into main
Reviewed-on: http://wibugit.wibudev.com/wibu/jenna-mcp/pulls/72
This commit is contained in:
@@ -362,10 +362,6 @@ const PelayananRoute = new Elysia({
|
|||||||
let dataInsertDataText = []
|
let dataInsertDataText = []
|
||||||
|
|
||||||
for (const item of syaratDokumen) {
|
for (const item of syaratDokumen) {
|
||||||
console.log('syarat dokumen', item)
|
|
||||||
const jenisFix = (category?.syaratDokumen as Array<{ name: string; desc: string }>)
|
|
||||||
?.find((v) => v.name == item.jenis || v.desc == item.jenis)?.name;
|
|
||||||
console.log('jenis fix', jenisFix)
|
|
||||||
dataInsertSyaratDokumen.push({
|
dataInsertSyaratDokumen.push({
|
||||||
idPengajuanLayanan: pengaduan.id,
|
idPengajuanLayanan: pengaduan.id,
|
||||||
idCategory: idCategoryFix,
|
idCategory: idCategoryFix,
|
||||||
@@ -375,9 +371,6 @@ const PelayananRoute = new Elysia({
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (const item of dataText) {
|
for (const item of dataText) {
|
||||||
console.log('dataitem', item)
|
|
||||||
const jenisFix = category?.dataText.find((v) => v.toLowerCase() == item.jenis.toLowerCase())
|
|
||||||
console.log('data text fix', jenisFix)
|
|
||||||
dataInsertDataText.push({
|
dataInsertDataText.push({
|
||||||
idPengajuanLayanan: pengaduan.id,
|
idPengajuanLayanan: pengaduan.id,
|
||||||
idCategory: idCategoryFix,
|
idCategory: idCategoryFix,
|
||||||
@@ -386,8 +379,6 @@ const PelayananRoute = new Elysia({
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('datainsertsyaratdokumen', dataInsertSyaratDokumen)
|
|
||||||
console.log('datainsertdatatext', dataInsertDataText)
|
|
||||||
|
|
||||||
await prisma.syaratDokumenPelayanan.createMany({
|
await prisma.syaratDokumenPelayanan.createMany({
|
||||||
data: dataInsertSyaratDokumen,
|
data: dataInsertSyaratDokumen,
|
||||||
|
|||||||
Reference in New Issue
Block a user