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

View File

@@ -0,0 +1,76 @@
<template>
<v-menu
v-model="menu2"
:close-on-content-click="false"
:nudge-right="40"
lazy
transition="scale-transition"
offset-y
full-width
max-width="290px"
min-width="290px"
>
<v-text-field
slot="activator"
v-model="computedDateFormatted"
:label=init_label
persistent-hint
readonly
browser-autocomplete="off"
></v-text-field>
<v-date-picker v-model="init_date" no-title @input="menu2 = false" :max="init_max_date"></v-date-picker>
</v-menu>
</template>
<script>
module.exports = {
props : ['label', 'date', 'data', 'max_date'],
data () {
return {
init_date: this.date && this.date != "0000-00-00" ? this.date : null, //new Date().toISOString().substr(0, 10),
init_max_date: this.max_date ? this.max_date : '2999-09-09',
dateFormatted: this.formatDate(new Date().toISOString().substr(0, 10)),
menu1: false,
menu2: false,
init_label: this.label ? this.label : 'Date',
init_data: this.data ? this.data : ''
}
},
computed: {
computedDateFormatted () {
return this.formatDate(this.init_date)
}
},
watch: {
init_date (n, o) {
this.dateFormatted = this.formatDate(this.init_date)
this.$emit('change', {"old_date":o, "new_date":n, "data":this.init_data});
}
},
methods: {
formatDate (date) {
if (!date) { return null }
const [year, month, day] = date.split('-')
return `${day}-${month}-${year}`
},
parseDate (date) {
if (!date) return null
const [month, day, year] = date.split('/')
return `${year}-${month.padStart(2, '0')}-${day.padStart(2, '0')}`
},
emitChange (n, o) {
console.log("old:"+o)
console.log("new:"+n)
}
}
}
</script>

View File

@@ -0,0 +1,699 @@
<template>
<v-layout class="fill-height" column>
<v-dialog v-model="dialogsuccess" persistent max-width="290">
<v-card>
<v-card-title color="success" class="headline">Berhasil !</v-card-title>
<v-card-text>
{{msgsuccess}}
</v-card-text>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn color="green darken-1" flat @click="closeDialogSuccess">OK</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
<v-dialog v-model="dialogconfirmationdeleteorder" persistent max-width="290">
<v-card>
<v-card-title dark class="headline error pt-2 pb-2" primary-title style="color:white">
<h4 dark>Konfirmasi</h4>
</v-card-title>
<v-card-text>
{{msgconfirmationdeleteorder}}
</v-card-text>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn small color="error darken-1 text-sm-left" flat @click="doDeleteOrder()">Hapus</v-btn>
<v-btn small color="primary darken-1 text-sm-right" flat @click="dialogconfirmationdeleteorder = false">Batal</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
<v-card class="mb-2 pa-2 searchbox">
<v-layout>
<v-flex class="text-sm-left" xs6>
<one-date-picker label="Tanggal" :date="init_date" @change="searchPatient" :data="null" :max_date="null" class="mr-4"></one-date-picker>
</v-flex>
<v-flex class="text-sm-right" xs6>
<v-btn @click="save()" color="primary">Konfirmasi</v-btn>
</v-flex>
</v-layout>
</v-card>
<v-card>
<v-layout row>
<v-flex xs12 pl-2 pr-2 pt-2 pb-2>
<table style="
font-family: arial, sans-serif;
border-collapse: collapse;
width: 100%;
border: 0px;
" class="px">
<tr>
<td style="border: 1px solid #BDBBBB;
border-collapse: collapse;
padding-top: 1px;
padding-bottom: 1px;" width="10%" class="pa-2 blue lighten-3 white--text">WORKLIST
</td>
<td style="border: 1px solid #BDBBBB;
border-collapse: collapse;
padding-top: 1px;
padding-bottom: 1px;" width="10%" class="pa-2 blue lighten-3 white--text">PEMERIKSAAN
</td>
<td style="border: 1px solid #BDBBBB;
border-collapse: collapse;
padding-top: 1px;
padding-bottom: 1px;" width="80%" class="pa-2 blue lighten-3 white--text">ORDER
</td>
</tr>
<tr class="mini-input" v-for="(vpx,idx) in worklists">
<td style="border: 1px solid #BDBBBB;
border-collapse: collapse;
padding-top: 1px;
padding-bottom: 1px;
padding: 8px;" class="text-md-left pl-3">{{vpx.T_WorklistName}}</td>
<td style="border: 1px solid #BDBBBB;
border-collapse: collapse;
padding-top: 1px;
padding-bottom: 1px;
padding: 8px;" class="text-md-left pr-2">{{vpx.T_TestName}}</td>
<td style="border: 1px solid #BDBBBB;
border-collapse: collapse;
padding-top: 1px;
padding-bottom: 1px;
padding: 8px;">
<v-layout xs12 row wrap>
<v-flex xs3 v-for="(p, i) in vpx.labs" v-bind:key="p.T_OrderDetailID" class="pr-2 pb-1">
<v-layout row>
<v-flex class="boxoutline" class="text-left" style="padding-top:10px" pl-2 pb-2 pr-2 xs2>
<v-layout row align-left justify-space-between>
<v-icon v-if="p.ischoose === 'N'" @click="changeChoose(idx,i,p)" style="color:red">clear</v-icon>
<v-icon v-if="p.ischoose === 'Y'" @click="changeChoose(idx,i,p)" style="color:green">check</v-icon>
</v-layout>
</v-flex>
<v-flex class="boxoutline" style="text-overflow:ellipsis;overflow:hidden;" xs11>
<span>{{p.labnumber}}</span>
</v-flex>
</v-layout>
</v-flex>
</v-layout>
</td>
</table>
</v-flex>
</v-layout>
</v-card>
<one-dialog-alert :status="openalertconfirmation" :msg="msgalertconfirmation" @forget-dialog-alert="forgetAlertConfirmation()"
@close-dialog-alert="closeAlertConfirmation()"></one-dialog-alert>
<template>
<v-layout row justify-center>
<v-dialog v-model="dialogformorder" persistent max-width="600px">
<v-card>
<v-card-title>
<span class="headline">Form Kelompok Pelanggan</span>
</v-card-title>
<v-card-text class="pt-0 pb-0">
<v-form ref="formcompany">
<v-layout row wrap>
<v-flex xs12 pa-2>
<v-layout row>
<v-flex xs12 pa-1>
<v-autocomplete readonly label="Kelompok Pelanggan*" v-model="xcompany" :items="xcompanies" :search-input.sync="search_company"
auto-select-first no-filter item-text="M_CompanyName" return-object :loading="isLoading"
no-data-text="Pilih Perusahaan">
<template slot="item" slot-scope="{ item }">
<v-list-tile-content>
<v-list-tile-title v-text="item.M_CompanyName"></v-list-tile-title>
</v-list-tile-content>
</template>
</v-autocomplete>
<p v-if="checkError('requirexcompany')" class="error pl-2 pr-2" style="color:#fff">Pilih kelompok pelanggan dulu dong</p>
</v-flex>
</v-layout>
<v-layout row>
<v-flex xs12 pa-1>
<v-select readonly :search-input.sync="searchMou" item-text="M_MouName" return-object :items="xmous" v-model="xmou" label="Agreement*"
autocomplete></v-select>
<p v-if="checkError('requirexmou')" class="error pl-2 pr-2" style="color:#fff">Pilih Agreement dulu dong</p>
</v-flex>
</v-layout>
<v-layout row>
<v-flex xs12 pa-1>
<v-text-field label="Tgl. Order" placeholder="dd-mm-yyyy" mask="##-##-####" v-model="xsdate"></v-text-field>
</v-flex>
</v-layout>
<v-layout row>
<v-flex xs12 pa-1>
<v-text-field v-model="xnote" label="Catatan"></v-text-field>
</v-flex>
</v-layout>
</v-flex>
</v-layout>
</v-card-text>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn color="blue darken-1" flat @click="updateDialogFormOrder()">Tutup</v-btn>
<v-btn v-if="xact === 'new'" color="blue darken-1" flat @click="saveFormPerusahaan()">Simpan</v-btn>
<v-btn v-if="xact === 'edit'" color="blue darken-1" flat @click="updateFormPerusahaan()">Simpan Perubahan</v-btn>
</v-card-actions>
</v-form>
</v-card>
</v-dialog>
</v-layout>
</template>
<template>
<v-layout row justify-center>
<v-dialog v-model="dialogstatusorder" persistent max-width="600px">
<v-card>
<v-card-title>
<span class="headline">Status</span>
</v-card-title>
<v-card-text class="pt-0 pb-0">
<v-timeline>
<v-timeline-item v-for="(status, i) in xstatuss" :key="i" :waktu="status.waktu" :user="status.user" small>
<template>
<span :class="`headline font-weight-bold cyan--text`" v-text="status.status"></span>
</template>
<div class="py-3">
<h2 :class="`headline font-weight-light mb-3 cyan--text`"></h2>
<div>
{{status.waktu}}
<p> [ {{status.user}} ] </p>
</div>
</div>
</v-timeline-item>
</v-timeline>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn color="blue darken-1" flat @click="updateDialogStatusOrder()">Tutup</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
</v-layout>
</template>
</v-layout>
</template>
<style scoped>
.searchbox .v-input.v-text-field .v-input__slot {
min-height: 60px;
}
.searchbox .v-btn {
min-height: 60px;
}
.boxoutline {
color: teal;
border: 1px solid teal;
justify-content: center;
height: 45px;
line-height: 45px;
padding-left: 5px;
background: #ffffff;
font-size: 12px;
font-weight: 200;
border-radius: 1px
}
.boxoutline:hover {
background: rgba(0, 0, 0, 0.07) !important;
font-size: 12px;
font-weight: 300;
}
table.v-table tbody td,
table.v-table tbody th {
height: 40px;
}
table.v-table thead tr {
height: 40px;
}
</style>
<script>
module.exports = {
components: {
'one-date-picker': httpVueLoader('./oneDatePicker2.vue'),
'one-dialog-info': httpVueLoader('../../common/oneDialogInfo.vue'),
'one-dialog-alert': httpVueLoader('../../common/oneDialogAlert.vue')
},
mounted() {
this.$store.dispatch("worklist/getsexreg", {
sexid: 0
})
this.$store.dispatch("worklist/search", {
name: moment().format("Y-M-D"),
lastid: -1
})
},
methods: {
checkError(value) {
var errors = this.$store.state.worklist.errors
if (errors.includes(value)) {
return true
} else {
return false
}
},
isSelected(p) {
return p.T_WorklistID == this.$store.state.worklist.selected_worklist
.T_WorklistID
},
searchPatient(prm) {
this.$store.dispatch("worklist/search", {
name: prm.new_date,
lastid: -1
})
this.init_date = prm.new_date
},
changeChoose(idx, i, value) {
let arr = this.$store.state.worklist.worklists
arr[idx]['labs'][i].ischoose = value.ischoose === 'N' ? 'Y' : 'N'
this.$store.commit("worklist/update_worklists", arr)
},
selectMe(pat) {
if (this.$store.state.worklist.no_save == 0) {
this.$store.commit("worklist/update_selected_worklist", pat)
this.$store.commit("worklist/update_act_comp", 'edit')
this.$store.commit("worklist/update_rumusx", pat.T_WorklistFormula)
this.$store.commit("worklist/update_x_pat_id", pat.T_WorklistID)
this.$store.commit("worklist/update_namacalculation", pat.T_WorklistName)
this.$store.commit("worklist/update_rumus", pat.T_WorklistFormula)
this.$store.commit("worklist/update_autotests", [{
Nat_TestID: pat.T_WorklistNat_TestID,
Nat_TestName: pat.Nat_TestName
}])
this.$store.commit("worklist/update_autotest", {
Nat_TestID: pat.T_WorklistNat_TestID,
Nat_TestName: pat.Nat_TestName
})
this.$store.commit("worklist/update_selected_sex", {
Nat_SexID: pat.T_WorklistNat_SexID,
Nat_SexName: pat.Nat_SexName
})
this.$store.commit("worklist/update_statuss", pat.statuss)
} else {
this.$store.commit("worklist/update_open_alert_confirmation", true)
}
},
editCalculation() {
this.$store.commit("worklist/update_act_pat", 'edit')
this.$store.commit("worklist/update_dialog_form_detail", true)
},
deleteCalculation() {
this.$store.commit("worklist/update_act_pat", 'delete')
this.$store.commit("worklist/update_x_pat_id", this.$store.state.worklist.x_pat_id)
this.$store.commit("worklist/update_errors", [])
var errors = this.$store.state.worklist.errors
var msg = ''
msg = "Yakin, akan menghapus data rumus " + this.$store.state.worklist.selected_worklist
.T_WorklistName + " ?"
this.$store.commit("worklist/update_msg_confirmation_delete_pat", msg)
this.$store.commit("worklist/update_dialog_confirmation_delete_pat", true)
},
closeAlertConfirmation() {
this.$store.commit("worklist/update_open_alert_confirmation", false)
},
forgetAlertConfirmation() {
this.$store.commit("worklist/update_no_save", 0)
this.$store.commit("worklist/update_open_alert_confirmation", false)
},
updateAlert_success(val) {
this.$store.commit("worklist/update_alert_success", val)
},
updateDialogFormOrder() {
this.$store.commit("worklist/update_dialog_form_order", false)
},
updateDialogStatusOrder() {
this.$store.commit("worklist/update_dialog_status_order", false)
},
setNewOrder() {
this.$store.commit("worklist/update_selected_worklist", {})
this.$store.commit("worklist/update_act_pat", 'new')
this.$store.commit("worklist/update_dialog_form_detail", true)
this.$store.commit("worklist/update_isage", 'N')
this.$store.commit("worklist/update_issex", 'N')
this.$store.commit("worklist/update_rumusx", '')
this.$store.commit("worklist/update_x_pat_id", 0)
this.$store.commit("worklist/update_namacalculation", '')
this.$store.commit("worklist/update_xisage", 'N')
this.$store.commit("worklist/update_xissex", 'N')
this.$store.commit("worklist/update_rumus", '')
this.$store.commit("worklist/update_autotests", [])
this.$store.commit("worklist/update_autotest", {})
this.$store.commit("worklist/update_selected_sex", [])
this.$store.commit("worklist/update_ordertests", [])
},
editOrder(val) {
this.$store.commit("worklist/update_selected_worklist", val)
this.$store.commit("worklist/update_act_comp", 'edit')
this.$store.commit("worklist/update_dialog_form_order", true)
this.xsdate = val.sdate
this.$store.commit("worklist/update_companies", [{
M_CompanyID: this.xcompanyid,
M_CompanyName: this.xcompanyname
}])
this.xcompany = {
M_CompanyID: this.xcompanyid,
M_CompanyName: this.xcompanyname
}
this.$store.commit("worklist/update_mous", [{
M_MouID: val.T_WorklistM_MouID,
M_MouName: val.M_MouName
}])
this.xmou = {
M_MouID: val.T_WorklistM_MouID,
M_MouName: val.M_MouName
}
this.xnote = val.T_WorklistNote
},
setStatusOrder() {
this.$store.commit("worklist/update_selected_worklist", {})
this.$store.commit("worklist/update_dialog_status_order", true)
this.search_company = ''
},
save() {
var prm = this.$store.state.worklist.worklists
this.$store.dispatch("worklist/save", prm)
},
saveFormPerusahaan() {
this.$store.commit("worklist/update_errors", [])
var errors = this.$store.state.worklist.errors
if (_.isEmpty(this.xcompany)) {
errors.push("requirexcompany")
}
if (_.isEmpty(this.xmou)) {
errors.push("requirexmou")
}
if (_.isEmpty(this.xsdate)) {
errors.push("requirexsdate")
}
if (errors.length === 0) {
this.$store.dispatch("worklist/newworklist", {
companyid: this.xcompany.M_CompanyID,
mouid: this.xmou.M_MouID,
sdate: moment(this.xsdate, 'DDMMYYYY', true),
note: this.xnote
})
}
},
updateFormPerusahaan() {
this.$store.commit("worklist/update_errors", [])
var errors = this.$store.state.worklist.errors
if (_.isEmpty(this.xcompany)) {
errors.push("requirexcompany")
}
if (_.isEmpty(this.xmou)) {
errors.push("requirexmou")
}
if (_.isEmpty(this.xsdate)) {
errors.push("requirexsdate")
}
if (errors.length === 0) {
this.$store.dispatch("worklist/save", {
id: this.$store.state.worklist.selected_worklist.T_WorklistID,
companyid: this.xcompany.M_CompanyID,
mouid: this.xmou.M_MouID,
sdate: moment(this.xsdate, 'DDMMYYYY', true),
note: this.xnote,
nomor: this.$store.state.worklist.selected_worklist.T_WorklistNumber
})
}
},
deleteOrder(value) {
this.$store.commit("worklist/update_act_comp", 'delete')
this.$store.commit("worklist/update_errors", [])
var errors = this.$store.state.worklist.errors
var msg = ''
msg = "Yakin, akan menghapus data nomor " + value.T_WorklistNumber + " ?"
this.$store.commit("worklist/update_msg_confirmation_delete", msg)
this.$store.commit("worklist/update_dialog_confirmation_delete", true)
},
doDeleteOrder() {
var prm = {}
prm.T_WorklistID = this.$store.state.worklist.selected_worklist
.T_WorklistID
prm.T_WorklistNumber = this.$store.state.worklist.selected_worklist
.T_WorklistNumber
this.$store.dispatch("worklist/delete", prm)
},
thr_search_company: _.debounce(function () {
this.$store.dispatch("worklist/searchcompany", this.search_company)
}, 2000),
closeDialogSuccess() {
let arrworklist = this.$store.state.worklist.worklists
var idx = _.findIndex(arrworklist, item => item.T_WorklistID === this.$store.state
.worklist.last_id)
console.log(idx)
this.$store.dispatch("worklist/search", {
name: this.init_date,
lastid: idx
})
this.$store.commit("worklist/update_dialog_success", false)
},
formatDate(date) {
if (!date) return null
const [year, month, day] = date.split('-')
return `${day}-${month}-${year}`
},
deFormatedDate(date) {
if (!date) return null
const [day, month, year] = date.split('-')
return `${year}-${month.padStart(2, '0')}-${day.padStart(2, '0')}`
}
},
computed: {
dialogsuccess: {
get() {
return this.$store.state.worklist.dialog_success
},
set(val) {
this.$store.commit("worklist/update_dialog_success", val)
}
},
msgsuccess() {
return this.$store.state.worklist.msg_success
},
snackbar: {
get() {
return this.$store.state.worklist.alert_success
},
set(val) {
this.$store.commit("worklist/update_alert_success", val)
}
},
dialogconfirmationdeleteorder: {
get() {
return this.$store.state.worklist.dialog_confirmation_delete
},
set(val) {
this.$store.commit("worklist/update_dialog_confirmation_delete", val)
}
},
xactsend() {
return this.$store.state.worklist.act_send
},
msgconfirmationdeleteorder() {
return this.$store.state.worklist.msg_confirmation_delete
},
isLoading() {
return this.$store.state.worklist.search_status == 1
},
xact() {
return this.$store.state.worklist.act_comp
},
worklists() {
return this.$store.state.worklist.worklists
},
orderlabs() {
return this.$store.state.worklist.orderlabs
},
openalertconfirmation: {
get() {
return this.$store.state.worklist.open_alert_confirmation
},
set(val) {
this.$store.commit("worklist/update_open_alert_confirmation", val)
}
},
dialogformorder() {
return this.$store.state.worklist.dialog_form_order
},
dialogstatusorder() {
return this.$store.state.worklist.dialog_status_order
},
xdate: {
get() {
return this.$store.state.worklist.date
},
set(val) {
this.$store.commit("worklist/update_date", val)
}
},
xnote: {
get() {
return this.$store.state.worklist.note
},
set(val) {
this.$store.commit("worklist/update_note", val)
}
},
xcompanyid: {
get() {
return this.$store.state.worklist.companyid
},
set(val) {
this.$store.commit("worklist/update_companyid", val)
}
},
xcompanyname: {
get() {
return this.$store.state.worklist.companyname
},
set(val) {
this.$store.commit("worklist/update_companyname", val)
}
},
xmouid: {
get() {
return this.$store.state.worklist.mouid
},
set(val) {
this.$store.commit("worklist/update_mouid", val)
}
},
xmouname: {
get() {
return this.$store.state.worklist.mouname
},
set(val) {
this.$store.commit("worklist/update_mouname", val)
}
},
xcompanies() {
return this.$store.state.worklist.companies
},
xcompany: {
get() {
return this.$store.state.worklist.company
},
set(val) {
this.$store.commit("worklist/update_company", val)
}
},
xmous() {
return this.$store.state.worklist.mous
},
xmou: {
get() {
return this.$store.state.worklist.mou
},
set(val) {
this.$store.commit("worklist/update_mou", val)
}
},
startComputedDateFormatted() {
return this.formatDate(this.xsdate)
},
xsdate: {
get() {
return this.$store.state.worklist.sdate
},
set(val) {
this.$store.commit("worklist/update_sdate", val)
}
},
xstatuss() {
return this.$store.state.worklist.statuss
}
},
data() {
return {
msgalertconfirmation: "Perubahan yang telah dilakukan belum disimpan dong !",
items: [],
name: '',
search_company: '',
searchMou: '',
menusdate: false,
init_date: moment().format("Y-M-D"),
date: new Date().toISOString().substr(0, 10),
page: 1,
headers: [{
text: "WORKLIST",
align: "center",
sortable: false,
value: "mr",
width: "5%",
class: "pa-2 blue lighten-3 white--text"
},
{
text: "PEMERIKSAAN",
align: "center",
sortable: false,
value: "lab",
width: "10%",
class: "pa-2 blue lighten-3 white--text"
},
{
text: "ORDER",
align: "center",
sortable: false,
value: "lab",
width: "80%",
class: "pa-2 blue lighten-3 white--text"
}
],
pagination: {
descending: true,
page: 1,
rowsPerPage: 5,
sortBy: 'T_WorklistID',
totalItems: this.$store.state.worklist.total_worklists
},
statuss: [{
waktu: '16-07-2019 10:00',
status: 'Order Dibuat',
user: 'Nagita Slavina'
},
{
waktu: '16-07-2019 11:00',
status: 'Order Dikirim',
user: 'Nagita Slavina'
},
{
waktu: '16-07-2019 12:00',
status: 'Order dikonfirmasi',
user: 'Chacha Frederica'
},
{
waktu: '16-07-2019 13:00',
status: 'Telah dibuat Surat Jalan',
user: 'Chacha Frederica'
},
{
waktu: '16-07-2019 14:00',
status: 'Kurir akan mengambil sampel',
user: 'Satria Subiantoro'
}
]
};
},
watch: {
search_company(val, old) {
if (val == old) return
if (!val) return
if (val.length < 1) return
if (this.$store.state.worklist.update_autocomplete_status == 1) return
this.thr_search_company()
}
}
}
</script>