const store = { state() { return { patients: [ { tanggal: "31-07-2024", noreg: "055000037LA", kelpelanggan: "PASIEN MANDIRI", nama: "Tn. Alpha", status: "call", }, { tanggal: "31-07-2024", noreg: "055000036LA", kelpelanggan: "PASIEN KLINISI", nama: "Tn. Beta", status: "New", }, { tanggal: "30-07-2024", noreg: "055000035LA", kelpelanggan: "PASIEN KLINISI", nama: "Tn. Gamma", status: "New", }, ], selected_patients: { tanggal: "-", noreg: "-", kelpelanggan: "-", nama: "-", status: "-", }, }; }, mutations: { setPatients(state, data) { state.patients = data }, setSelectedPatients(state, data) { state.selected_patients = data }, }, actions: { selectPatient({ commit, data }) { commit('setSelectedPatients', data); } } } export default store