+
{{ data.text }}
-+
+ {{ + isNumber(data.text) + ? data.column.caption == '%' + ? formatPercentage(data.text) + : formatNumber(data.text) + : data.text + }} +
+ + + ++ {{ + isNumber(data.text) + ? data.column.caption == '%' + ? formatPercentage(data.text) + : formatNumber(data.text) + : data.text + }} +
+ + + +{{ isNumber(data.text) ? data.column.caption == '%' @@ -522,13 +549,17 @@ const reportMeta = ref({ posko: { id: 0, name: 'Semua Posko' }, periode: '' }) +const poskoSelected = ref('') +const setPoskoSelected = (value: string) => { + poskoSelected.value = value +} const getDetail = async () => { loadingSubData.value = true const dateValue = filters.value.periode.split(' s/d ') const ref = dataSelected.value - const query = { + var query: any = { dateFrom: dateValue[0] ? dateValue[0].split('-').reverse().join('-') : new Date().toISOString().slice(0, 10), @@ -537,8 +568,8 @@ const getDetail = async () => { : new Date().toISOString().slice(0, 10), idUid: ref.id_uid, idUp3: ref.id_up3, - idPoskoLama: ref.id_posko_lama, - idPoskoBaru: ref.id_posko_baru + idPoskoLama: poskoSelected.value == 'baru' ? 0 : ref.id_posko_baru, + idPoskoBaru: poskoSelected.value == 'lama' ? 0 : ref.id_posko_lama } await requestGraphQl(queries.gangguan.rekap.gangguanAlihPoskoDetail, query) @@ -567,8 +598,9 @@ const showDetail = () => { clearSelection() dataSub.value = [] dataSubSelected.value = null - // dialogDetail.value = true - getDetail() + if (poskoSelected.value != '') { + getDetail() + } } const closeDialog = () => { diff --git a/src/utils/api/api.graphql.ts b/src/utils/api/api.graphql.ts index b3ba376..98427af 100755 --- a/src/utils/api/api.graphql.ts +++ b/src/utils/api/api.graphql.ts @@ -1661,16 +1661,16 @@ export const queries = { $dateTo: Date! $idUid: Int! $idUp3: Int! - $idPoskoLama: Int! $idPoskoBaru: Int! + $idPoskoLama: Int! ) { detailGangguanAlihPosko( dateFrom: $dateFrom dateTo: $dateTo idUid: $idUid idUp3: $idUp3 - idPoskoLama: $idPoskoLama idPoskoBaru: $idPoskoBaru + idPoskoLama: $idPoskoLama ) { id nama_regional