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,677 @@
<template>
<v-layout class="fill-height" column>
<v-dialog
v-model="xemaildialog"
persistent
max-width="20%"
>
<v-card>
<v-card-title
class="headline cyan darken-1 pt-2 pb-2"
primary-title
style="color:white"
>
<h4 >GANTI EMAIL</h4>
</v-card-title>
<v-card-text class="pt-2 pb-2">
<v-layout wrap>
<v-flex xs12>
<v-layout v-for="email in xemails" row>
<v-flex xs12 pr-1>
<v-text-field
label="Email"
v-model="email.address"
></v-text-field>
</v-flex>
</v-layout>
</v-flex>
</v-layout>
</v-card-text>
<v-divider></v-divider>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn
color="cyan"
flat
@click="updateEmail()"
>
Simpan
</v-btn>
<v-btn
color="black"
flat
@click="xemaildialog = false"
>
Tutup
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
<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="dialogauthorize" persistent max-width="350">
<v-card class="align-center justify-center">
<v-card-title primary-title dark color="warning" class="warning white--text headline">OTORISASI HASIL</v-card-title>
<v-card-text>
<p v-if="requirestaff" class="error pl-2 pr-2" style="color:#fff">Staff harus dipilih salah satu dong</p>
<v-select class="ma-1" :items="xstaffs"
item-text="name"
return-object
v-model="xselectedstaff"
label="STAFF" outline hide-details></v-select>
</v-card-text>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn color="green darken-1" flat @click="doAuthorization()">Simpan</v-btn>
<v-btn color="red darken-1" flat @click="dialogauthorize = false">Batal</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
<v-card class="mb-1 pa-1">
<v-layout row>
<v-flex xs2>
<v-menu
v-model="menufilterdatestart"
:close-on-content-click="false"
:nudge-right="40"
lazy
transition="scale-transition"
offset-y
full-width
max-width="290px"
min-width="290px"
>
<template v-slot:activator="{ on }">
<v-text-field
class="ma-1"
v-model="filterComputedDateFormattedStart"
label="Janji Hasil"
outline
hide-details
readonly
v-on="on"
@blur="date = deFormatedDate(filterComputedDateFormattedStart)"
></v-text-field>
</template>
<v-date-picker v-model="xdatestart" no-title @input="menufilterdatestart = false"></v-date-picker>
</v-menu>
</v-flex>
<v-flex xs4>
<v-layout>
<v-text-field class="flex xs4 ma-1"
label="No Lab"
outline
hide-details
v-model="nolab"
></v-text-field>
<v-text-field class="flex xs8 ma-1"
label="Nama"
outline
hide-details
v-model="search"
></v-text-field>
</v-layout>
</v-flex>
<v-flex xs2>
<v-select class="xs2 mini-select ma-1" :items="xfilterworks"
item-text="name"
label="Tipe" outline
return-object
v-model="xselectedfilterwork"
hide-details></v-select>
</v-flex>
<v-flex xs2>
<v-select class="xs2 mini-select ma-1" :items="xfilterstatuses"
item-text="name"
label="Status" outline
return-object
v-model="xselectedfilterstatus"
hide-details></v-select>
</v-flex>
<v-flex xs2>
<v-layout>
<!--<v-btn style="height: 48px" class="flex xs6 ma-1" color="success" @click="searchs" >
Cari
</v-btn>-->
<span @click="searchs" class="icon-medium-fill-base xs1 white--text success iconsearch-search"></span>
</v-layout>
</v-flex>
<v-flex xs3 class="text-xs-right">
</v-flex>
</v-layout>
</v-card>
<v-card >
<v-layout row>
<v-flex xs12 pl-2 pr-2 pt-2 pb-2>
<v-data-table
:headers="headers"
:items="xtransactions"
:loading="isLoading"
hide-actions
class="elevation-1">
<template slot="items" slot-scope="props">
<td class="text-xs-center pa-2" dark :class="props.item.color_row" >{{ props.item.date_order }}</td>
<td class="text-xs-center pa-2" dark :class="props.item.color_row" >{{ props.item.labnumber}}</td>
<td class="text-xs-center pa-2" dark :class="props.item.color_row" >{{ props.item.patient_fullname}}</td>
<td class="text-xs-center pa-2" dark :class="props.item.color_row">
<v-layout v-if="props.item.edit_email === 'N'" align-center justify-center row>
<v-flex class="text-xs-right" xs9>
{{props.item.email_address}}
</v-flex>
<v-flex xs3>
<v-icon v-if="props.item.xid === '0'" @click="openEditEmail(props.item)" style="cursor:pointer" small left>edit</v-icon>
</v-flex>
</v-layout>
</td>
<td class="text-xs-center pa-2" dark :class="props.item.color_row">{{ props.item.date_promise}}</td>
<td class="text-xs-center pa-2" :class="props.item.color_row">
<v-btn v-for="xbtn in props.item.xgroups" @click="Authorization(props.item,xbtn)" :color="xbtnclass(xbtn)" dark small>{{xbtn.xgroup}}</v-btn>
</td>
</template>
</v-data-table>
<v-pagination
style="margin-top:10px;margin-bottom:5px"
v-model="curr_page"
:length="xtotal_page"
></v-pagination>
</v-flex>
</v-layout>
</v-card>
<one-dialog-alert :status="openalertconfirmation" :msg="msgalertconfirmation" @forget-dialog-alert="forgetAlertConfirmation()" @close-dialog-alert="closeAlertConfirmation()"></one-dialog-alert>
<one-dialog-info :status="opendialoginfo" :msg="msginfo" @close-dialog-info="closeDialogInfo()"></one-dialog-info>
<one-dialog-print :title="printtitle" :width="printwidth" :height="700" :status="openprintout" :urlprint="urlprintnote" @close-dialog-print="openprintout = false"></one-dialog-print>
</v-layout>
</template>
<style scoped>
.searchbox .v-input.v-text-field .v-input__slot{
min-height:60px;
}
.searchbox .v-btn {
min-height:60px;
}
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-dialog-info':httpVueLoader('../../common/oneDialogInfo.vue'),
'one-dialog-alert':httpVueLoader('../../common/oneDialogAlert.vue'),
'one-dialog-print':httpVueLoader('../../common/oneDialogPrintX.vue')
},
mounted() {
this.$store.dispatch("samplestorage/search",{
datepromise:this.xdatestart,
filter_work: this.xselectedfilterwork.value,
filter_status:this.xselectedfilterstatus.value,
nolab:this.nolab,
name:this.search,
current_page:1,
lastid:-1
})
},
methods : {
searchs(){
this.$store.dispatch("samplestorage/search",{
datepromise:this.xdatestart,
filter_work: this.xselectedfilterwork.value,
filter_status:this.xselectedfilterstatus.value,
nolab:this.nolab,
name:this.search,
current_page:1,
lastid:-1
})
},
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')}`
},
isSelected(p) {
return p.uniqid == this.$store.state.samplestorage.selected_transaction.uniqid
},
searchTransaction() {
this.$store.dispatch("samplestorage/search",{
startdate:this.xdatestart,
enddate: this.xdateend,
lastid:-1
})
},
selectMe(trx) {
if(this.$store.state.samplestorage.no_save == 0 ){
console.log(trx)
this.$store.commit("samplestorage/update_selected_transaction",trx)
this.$store.commit("samplestorage/update_act",'edit')
this.$store.commit("form/update_transaction_number",trx.trx_number)
this.$store.commit("form/update_transaction_date",trx.xdate)
this.$store.commit("form/update_transaction_time",trx.xtime)
this.$store.commit("form/update_sample_weight",trx.trx_sampleweight)
this.$store.commit("form/update_staffs",[{M_StaffID:trx.trx_staffid,M_StaffName:trx.trx_staffname}])
this.$store.commit("form/update_selected_staff",{M_StaffID:trx.trx_staffid,M_StaffName:trx.trx_staffname})
this.$store.commit("form/update_transaction_note",trx.trx_note)
this.$store.commit("form/update_detailnonsamples",trx.detailnonsamples)
this.$store.commit("form/update_details",trx.details)
}else{
this.$store.commit("samplestorage/update_open_alert_confirmation",true)
}
},
closeAlertConfirmation(){
this.$store.commit("samplestorage/update_open_alert_confirmation",false)
},
forgetAlertConfirmation(){
this.$store.commit("samplestorage/update_no_save",0)
this.$store.commit("samplestorage/update_open_alert_confirmation",false)
},
updateAlert_success(val){
this.$store.commit("samplestorage/update_alert_success",val)
},
setNewTransaction(){
this.$store.commit("samplestorage/update_selected_transaction",{})
this.$store.commit("samplestorage/update_act",'new')
this.$store.commit("form/update_transaction_number","")
this.$store.commit("form/update_sample_weight",0)
this.$store.commit("form/update_transaction_date",moment(new Date()).format('DD-MM-YYYY'))
this.$store.commit("form/update_transaction_time",moment(new Date()).format("hh:mm"))
this.$store.commit("form/update_transaction_note",'')
this.$store.commit("form/update_selected_vendor",{})
this.$store.commit("form/update_picname",'')
this.$store.commit("form/update_details",[])
this.$store.commit("form/update_detailnonsamples",[])
this.$store.commit("form/update_selected_almari",{})
this.$store.commit("form/update_selected_rack",{})
this.$store.commit("form/update_rack_contents",[])
this.$store.commit("form/update_staffs",[])
this.$store.commit("form/update_selected_staff",{})
},
closeDialogSuccess(){
let arrtrx = this.$store.state.samplestorage.transactions
var idx = _.findIndex(arrtrx, item => item.T_SampleStorageID === this.$store.state.samplestorage.last_id)
console.log(idx)
this.$store.dispatch("samplestorage/search",{
startdate:this.xdatestart,
enddate: this.xdateend,
lastid: idx
})
this.$store.commit("samplestorage/update_dialog_success",false)
},
closeDialogInfo(){
this.$store.commit("samplestorage/update_open_dialog_info",false)
},
printOut(val){
this.printwidth = 800
this.printtitle = ""
let idx = val.id
let user = one_user()
this.urlprintnote = "/birt/run?__report=report/one/lab/rpt_s_001.rptdesign&__format=pdf&username="+user.M_UserUsername+"&PID="+idx
this.openprintout = true
},
btngroups(xgroups){
var btn = "";
for (var x = 0; x < xgroups.length; x++) {
btn += '<v-btn color="error" dark>'+xgroups[x].xgroup+'</v-btn>'
}
return btn
},
Authorization(row,btn){
this.now_row = row
this.now_btn = btn
if(btn.type_work === 'manual' && parseInt(btn.print_count) > 0 && btn.status !== 'Y' && btn.print_type === 'Y'){
this.$store.commit("samplestorage/update_selected_staff",{})
this.dialogauthorize = true
}
},
doAuthorization(){
var row = this.now_row
var btn = this.now_btn
this.requirestaff = false
if(_.isEmpty(this.xselectedstaff)){
this.requirestaff = true
}else{
console.log(this.curr_page)
var prm = {
staff:this.xselectedstaff,
email_now:row.email_address,
email_old:row.old_email_address,
groupid:row.group_id,
type:btn.xgroup,
orderid:row.orderid,
promiseid:row.promiseid,
orderdeliveryid:row.orderdeliveryid,
group:btn.xgroup,
datepromise:this.xdatestart,
current_page:this.$store.state.samplestorage.current_page,
filter_work: this.xselectedfilterwork.value,
filter_status:this.xselectedfilterstatus.value,
nolab:this.nolab,
name:this.search,
lastid:-1
}
this.$store.dispatch("samplestorage/doauthorization",prm)
}
},
xbtnclass(btn){
//console.log(btn)
if(parseInt(btn.print_count) === 0){
return 'gray'
}
else if(parseInt(btn.print_count) > 0 && btn.status === 'N'){
return 'error'
}
else if(parseInt(btn.print_count) > 0 && btn.status === 'P'){
return 'warning'
}
else{
return 'success'
}
},
changeEmail(value){
let arr = this.$store.state.samplestorage.transactions
var idx = _.findIndex(arr, item => item.uniqid === value.uniqid)
arr[idx].email_address = value.email_address
this.$store.commit("samplestorage/update_transactions",arr)
},
openEditEmail(value){
/*let arr = this.$store.state.samplestorage.transactions
var idx = _.findIndex(arr, item => item.uniqid === value.uniqid)
arr[idx].edit_email = 'Y'
this.$store.commit("samplestorage/update_transactions",arr)*/
var emails = []
var rst = value.xemail.split("xfajrix")
rst.forEach((xval, index) => {
var splitval = xval.split("-")
emails.push({id:splitval[0],address:splitval[1]})
})
this.$store.commit("samplestorage/update_emails",emails)
this.xemaildialog = true
},
updateEmail(){
let emails = this.$store.state.samplestorage.emails
var prm = {
datepromise:this.xdatestart,
filter_work: this.xselectedfilterwork.value,
filter_status:this.xselectedfilterstatus.value,
nolab:this.nolab,
name:this.search,
current_page:this.curr_page,
lastid:-1,
emails:emails
}
this.$store.dispatch("samplestorage/updateemail",prm)
}
},
computed: {
change_page(x) {
this.curr_patient_page = x
},
openprintout: {
get() {
return this.$store.state.samplestorage.open_print_out
},
set(val) {
this.$store.commit("samplestorage/update_open_print_out",val)
}
},
dialogsuccess: {
get() {
return this.$store.state.samplestorage.dialog_success
},
set(val) {
this.$store.commit("samplestorage/update_dialog_success",val)
}
},
msgsuccess(){
return this.$store.state.samplestorage.msg_success
},
snackbar: {
get() {
return this.$store.state.samplestorage.alert_success
},
set(val) {
this.$store.commit("samplestorage/update_alert_success",val)
}
},
isLoading() {
return this.$store.state.samplestorage.search_status == 1
},
xdatestart : {
get() {
return this.$store.state.samplestorage.start_date
},
set(val) {
this.$store.commit("samplestorage/update_start_date",val)
}
},
xdateend : {
get() {
return this.$store.state.samplestorage.end_date
},
set(val) {
this.$store.commit("samplestorage/update_end_date",val)
}
},
filterComputedDateFormattedStart () {
return this.formatDate(this.xdatestart)
},
filterComputedDateFormattedEnd () {
return this.formatDate(this.xdateend)
},
xfilterworks() {
return this.$store.state.samplestorage.filter_work
},
xselectedfilterwork: {
get() {
return this.$store.state.samplestorage.selected_filter_work
},
set(val) {
this.$store.commit("samplestorage/update_selected_filter_work",val)
}
},
xfilterstatuses() {
return this.$store.state.samplestorage.filter_status
},
xselectedfilterstatus: {
get() {
return this.$store.state.samplestorage.selected_filter_status
},
set(val) {
this.$store.commit("samplestorage/update_selected_filter_status",val)
}
},
xtransactions() {
console.log(this.$store.state.samplestorage.transactions)
return this.$store.state.samplestorage.transactions
},
openalertconfirmation: {
get() {
return this.$store.state.samplestorage.open_alert_confirmation
},
set(val) {
this.$store.commit("samplestorage/update_open_alert_confirmation",val)
}
},
opendialoginfo: {
get() {
return this.$store.state.samplestorage.open_dialog_info
},
set(val) {
this.$store.commit("samplestorage/update_open_dialog_info",val)
}
},
xemaildialog: {
get() {
return this.$store.state.samplestorage.email_dialog
},
set(val) {
this.$store.commit("samplestorage/update_email_dialog",val)
}
},
xemails: {
get() {
return this.$store.state.samplestorage.emails
},
set(val) {
this.$store.commit("samplestorage/update_emails",val)
}
},
msginfo(){
return this.$store.state.samplestorage.msg_info
},
curr_page: {
get() {
return this.$store.state.samplestorage.current_page
},
set(val) {
this.$store.commit("samplestorage/update_current_page",val)
this.$store.dispatch("samplestorage/search",{
datepromise:this.xdatestart,
filter_work: this.xselectedfilterwork.value,
filter_status:this.xselectedfilterstatus.value,
nolab:this.nolab,
name:this.search,
current_page:val,
lastid:-1
})
}
},
xtotal_page: {
get() {
return this.$store.state.samplestorage.total_page
},
set(val) {
this.$store.commit("samplestorage/update_total_page",val)
}
},
dialogauthorize: {
get() {
return this.$store.state.samplestorage.dialog_authorize
},
set(val) {
this.$store.commit("samplestorage/update_dialog_authorize",val)
}
},
xstaffs() {
return this.$store.state.samplestorage.staffs
},
xselectedstaff: {
get() {
return this.$store.state.samplestorage.selected_staff
},
set(val) {
this.$store.commit("samplestorage/update_selected_staff",val)
}
},
},
data() {
return {
msgalertconfirmation:"Perubahan yang telah dilakukan belum disimpan dong !",
menufilterdatestart:false,
menufilterdateend:false,
urlprintnote:'',
printtitle:'',
printwidth:600,
date: new Date().toISOString().substr(0, 10),
items: [],
name: '',
page:1,
nolab:'',
search:'',
requirestaff:false,
now_row:{},
now_btn:{},
headers: [
{
text: "TANGGAL ORDER",
align: "CENTER",
sortable: false,
width: "10%",
class: "pa-2 blue lighten-3 white--text"
},
{
text: "NOMOR LAB",
align: "CENTER",
sortable: false,
width: "10%",
class: "pa-2 blue lighten-3 white--text"
},
{
text: "PASIEN",
align: "CENTER",
sortable: false,
width: "12%",
class: "pa-2 blue lighten-3 white--text"
},
{
text: "EMAIL",
align: "CENTER",
sortable: false,
width: "12%",
class: "pa-2 blue lighten-3 white--text"
},
{
text: "JANJI HASIL",
align: "CENTER",
sortable: false,
width: "10%",
class: "pa-2 blue lighten-3 white--text"
},
{
text: "OTORISASI",
align: "CENTER",
sortable: false,
width: "30%",
class: "pa-2 blue lighten-3 white--text"
}
]
};
}
}
</script>