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,508 @@
<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="dialogauthorize" persistent max-width="450">
<v-card class="align-center justify-center">
<v-card-title primary-title dark color="warning" class="warning white--text headline">TERIMA HASIL : {{type_nonlab}}</v-card-title>
<v-card-text>
<p>Yakin ? Akan terima dokumen hasil ? </p>
</v-card-text>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn color="green darken-1" flat @click="doAuthorization()">Yakin</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 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="ma-1 mini-select" :items="xfilterstatuses"
item-text="name"
return-object
v-model="xselectedfilterstatus"
label="Status" outline hide-details></v-select>
</v-flex>
<v-flex xs2>
<v-layout>
<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" >{{ props.item.date_order }}</td>
<td class="text-xs-center pa-2" >{{ props.item.labnumber}}</td>
<td class="text-xs-center pa-2" >{{ props.item.patient_fullname}}</td>
<td class="text-xs-center pa-2" >{{ props.item.date_promise}}</td>
<td class="text-xs-center pa-2" >
<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/getstaffs")
this.$store.dispatch("samplestorage/search",{
filter_status:this.xselectedfilterstatus.value,
nolab:this.nolab,
name:this.search,
current_page:1,
lastid:-1
})
},
methods : {
searchs(){
this.$store.commit("samplestorage/update_current_page",1)
this.$store.dispatch("samplestorage/search",{
filter_status:this.xselectedfilterstatus.value,
nolab:this.nolab,
name:this.search,
current_page:this.curr_page,
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)
},
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.status_fo === 'Y'){
this.type_nonlab = btn.xgroup
if(btn.xgroup === ''){
this.type_nonlab = 'LAB'
}
this.$store.commit("samplestorage/update_selected_staff",{})
this.dialogauthorize = true
}
},
doAuthorization(){
var row = this.now_row
var btn = this.now_btn
var prm = {
groupid:row.group_id,
type:btn.xgroup,
orderid:row.orderid,
promiseid:row.promiseid,
filter_status:this.xselectedfilterstatus.value,
nolab:this.nolab,
name:this.search,
lastid:-1,
current_page:this.$store.state.samplestorage.current_page
}
this.$store.dispatch("samplestorage/doauthorization",prm)
},
xbtnclass(btn){
//console.log(btn)
if(parseInt(btn.print_count) === 0){
if(btn.received === 'Y'){
return 'teal'
}
else
return 'gray'
}
else if(parseInt(btn.print_count) > 0 && btn.status === 'N'){
return 'error'
}
else if(parseInt(btn.print_count) > 0 && btn.status === 'P'){
if(btn.status_fo === 'Y')
return 'primary'
else
return 'warning'
}
else{
if(btn.status_fo === 'Y')
return 'primary'
else{
if(btn.status_received = 'Y'){
return 'teal'
}
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)
},
},
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)
}
},
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",{
filter_status:this.xselectedfilterstatus.value,
nolab:this.nolab,
name:this.search,
current_page:this.curr_page,
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: [],
type_nonlab:'',
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: "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>