Flatten nested repos

This commit is contained in:
sas.fajri
2026-04-27 10:13:31 +07:00
parent 01c2963a43
commit 8347aef8f4
17935 changed files with 5015229 additions and 3 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,50 @@
// 1 => LOADING
// 2 => DONE
// 3 => ERROR
import * as api from "../api/photo.js"
window.api = api
export default {
namespaced: true,
state: {
dialog_photo: false,
photo_64: '',
photo_url: './blank-profile.png',
default_photo_url: './blank-profile.png',
patient_id: 0
},
mutations: {
update_dialog_photo (state, v) {
state.dialog_photo = v
},
update_photo_64 (state, data) {
state.photo_64 = data
},
update_photo_url (state, data) {
state.photo_url = data
},
update_patient_id (state, id) {
state.patient_id = id
}
},
actions: {
async upload(context) {
try {
let resp = await api.upload(one_token(), context.state.patient_id, context.state.photo_64)
if (resp.status != "OK") {
} else {
context.commit('update_photo_url', resp.data.photo_url);
context.commit('update_dialog_photo', false)
}
} catch(e) {
console.log(e)
}
}
}
}