fix: nama_regu -> nama_petugas in pencarianData
This commit is contained in:
parent
7a70812b2e
commit
581801e098
@ -363,6 +363,7 @@ import InputText from '@/components/InputText.vue'
|
|||||||
import { queries, requestGraphQl } from '@/utils/api/api.graphql'
|
import { queries, requestGraphQl } from '@/utils/api/api.graphql'
|
||||||
import { exportToPDF, exportToXLSX, exportToDOCX } from '@/report/Gangguan/Daftar/DGangguan_DKPL'
|
import { exportToPDF, exportToXLSX, exportToDOCX } from '@/report/Gangguan/Daftar/DGangguan_DKPL'
|
||||||
import BufferDialog from '@/components/Dialogs/BufferDialog.vue'
|
import BufferDialog from '@/components/Dialogs/BufferDialog.vue'
|
||||||
|
import { readDataJson } from '@/utils/storage'
|
||||||
|
|
||||||
const data = ref<any[]>([])
|
const data = ref<any[]>([])
|
||||||
const dataSelected = ref<any>()
|
const dataSelected = ref<any>()
|
||||||
@ -434,6 +435,8 @@ const reportMeta = ref({
|
|||||||
})
|
})
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
// console.log(readDataJson('filterPresets'))
|
||||||
|
|
||||||
if (import.meta.env.DEV) {
|
if (import.meta.env.DEV) {
|
||||||
data.value = [
|
data.value = [
|
||||||
{
|
{
|
||||||
|
@ -131,7 +131,7 @@
|
|||||||
css-class="custom-table-column"
|
css-class="custom-table-column"
|
||||||
:width="170"
|
:width="170"
|
||||||
alignment="center"
|
alignment="center"
|
||||||
data-field="nama_regu"
|
data-field="nama_petugas"
|
||||||
caption="Petugas"
|
caption="Petugas"
|
||||||
cell-template="formatText"
|
cell-template="formatText"
|
||||||
/>
|
/>
|
||||||
@ -223,7 +223,7 @@
|
|||||||
|
|
||||||
<div class="flex flex-row items-center justify-between w-full">
|
<div class="flex flex-row items-center justify-between w-full">
|
||||||
<h3 class="text-sm font-medium w-[170px] text-gray-800">Petugas:</h3>
|
<h3 class="text-sm font-medium w-[170px] text-gray-800">Petugas:</h3>
|
||||||
<InputText :readonly="true" :value="dataSelected?.nama_regu" class-name="flex-1" />
|
<InputText :readonly="true" :value="dataSelected?.nama_petugas" class-name="flex-1" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</DetailDialog>
|
</DetailDialog>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { ref, computed } from 'vue'
|
import { ref, computed } from 'vue'
|
||||||
import { defineStore } from 'pinia'
|
import { defineStore } from 'pinia'
|
||||||
import { dispatchNotification } from '@/components/Notification'
|
import { dispatchNotification } from '@/components/Notification'
|
||||||
import { readData, removeData, writeData } from '@/utils/storage'
|
import { readData, removeData, writeData, writeDataJson } from '@/utils/storage'
|
||||||
import router from '@/router'
|
import router from '@/router'
|
||||||
|
|
||||||
export const useAuthStore = defineStore('auth', () => {
|
export const useAuthStore = defineStore('auth', () => {
|
||||||
@ -12,6 +12,12 @@ export const useAuthStore = defineStore('auth', () => {
|
|||||||
const password = ref('')
|
const password = ref('')
|
||||||
const isLoading = ref(false)
|
const isLoading = ref(false)
|
||||||
const isLoggedIn = computed(() => token.value !== '')
|
const isLoggedIn = computed(() => token.value !== '')
|
||||||
|
const filterPresets = {
|
||||||
|
uid: {
|
||||||
|
id: 2,
|
||||||
|
name: 'DISTRIBUSI JAKARTA RAYA'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// define your actions
|
// define your actions
|
||||||
const login = () => {
|
const login = () => {
|
||||||
@ -28,6 +34,8 @@ export const useAuthStore = defineStore('auth', () => {
|
|||||||
if (username.value == 'demo' && password.value == 'demo') {
|
if (username.value == 'demo' && password.value == 'demo') {
|
||||||
// store token in localStorage
|
// store token in localStorage
|
||||||
writeData('token', 'secret-token')
|
writeData('token', 'secret-token')
|
||||||
|
writeDataJson('filterPresets', filterPresets)
|
||||||
|
|
||||||
dispatchNotification({
|
dispatchNotification({
|
||||||
title: 'Berhasil',
|
title: 'Berhasil',
|
||||||
content: 'Login berhasil, selamat datang kembali!',
|
content: 'Login berhasil, selamat datang kembali!',
|
||||||
@ -46,7 +54,10 @@ export const useAuthStore = defineStore('auth', () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const logout = () => removeData('token')
|
const logout = () => {
|
||||||
|
removeData('token')
|
||||||
|
removeData('filterPresets')
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
token,
|
token,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user