Initial import

This commit is contained in:
sas.fajri
2026-04-27 10:08:27 +07:00
commit 01c2963a43
356 changed files with 197152 additions and 0 deletions

75
common/oneDatePicker.vue Normal file
View File

@@ -0,0 +1,75 @@
<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
hint="DD-MM-YYYY format"
persistent-hint
readonly
></v-text-field>
<v-date-picker v-model="init_date" no-title @input="menu2 = false"></v-date-picker>
</v-menu>
</template>
<script>
module.exports = {
props : ['label', 'date', 'data'],
data () {
return {
init_date: this.date ? this.date : new Date().toISOString().substr(0, 10),
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>

80
common/oneDialogAlert.vue Normal file
View File

@@ -0,0 +1,80 @@
<template>
<v-dialog
v-model="dialog"
max-width="30%"
>
<v-card>
<v-card-title
class="headline grey lighten-2 pt-2 pb-2"
primary-title
>
Peringatan !
</v-card-title>
<v-card-text class="pt-2 pb-2">
<v-layout row>
<v-flex xs12 d-flex>
<v-layout row>
<v-flex pb-1 xs12>
<v-layout row>
<v-flex pt-2 pr-2 xs12>
{{xmsg}}
</v-flex>
</v-layout>
</v-flex>
</v-layout>
</v-flex>
</v-layout>
</v-card-text>
<v-divider></v-divider>
<v-card-actions>
<v-btn
color="error"
flat
@click="forgetAlert()"
>
Abaikan
</v-btn>
<v-spacer></v-spacer>
<v-btn
color="primary"
flat
@click="closeAlert()"
>
OK
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
</template>
<style scoped>
</style>
<script>
module.exports = {
props : ['status', 'msg'],
computed : {
xmsg() {
return this.msg
},
dialog: {
get() {
return this.status
},
set(val) {
this.$emit('close-dialog-alert')
}
}
},
methods: {
closeAlert() {
this.$emit('close-dialog-alert')
},
forgetAlert() {
this.$emit('forget-dialog-alert')
}
}
}
</script>

View File

@@ -0,0 +1,56 @@
<template>
<v-dialog
v-model="dialog"
max-width="30%"
>
<v-card>
<v-card-title
class="headline grey lighten-2 pt-2 pb-2"
primary-title
>
Peringatan !
</v-card-title>
<v-card-text class="pt-2 pb-2" v-html="xmsg">
</v-card-text>
<v-divider></v-divider>
<v-card-actions>
<v-btn
color="primary"
flat
@click="closeAlertValidation()"
>
Tutup
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
</template>
<style scoped>
</style>
<script>
module.exports = {
props : ['status', 'msg'],
computed : {
xmsg() {
return this.msg
},
dialog: {
get() {
return this.status
},
set(val) {
this.$emit('close-dialog-alert-validation')
}
}
},
methods: {
closeAlertValidation() {
this.$emit('close-dialog-alert-validation')
}
}
}
</script>

View File

@@ -0,0 +1,49 @@
<template>
<v-layout row justify-center>
<v-dialog v-model="dialog" persistent max-width="290">
<v-card>
<v-card-title class="headline">Konfirmasi</v-card-title>
<v-card-text>{{ init_text }}</v-card-text>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn color="green darken-1" flat @click="dialog = false">Batal</v-btn>
<v-btn color="green darken-1" dark @click="confirm">{{ init_button_confirm }}</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
</v-layout>
</template>
<script>
module.exports = {
props : ['text', 'data', 'button_confirm'],
data () {
return {
init_text : this.text ? this.text : 'Apakah anda akan menghapus data tersebut ?',
init_data : this.data ? this.data : null,
init_button_confirm : this.button_confirm ? this.button_confirm : 'Hapus'
}
},
computed : {
dialog : {
get () {
return this.$store.state.dialog_confirm
},
set (v) {
this.$store.commit('update_dialog_confirm', v)
}
}
},
methods : {
confirm : function() {
this.dialog = false
console.log('Confirm dialog : confirmed')
this.$emit('confirm', {data: this.init_data});
}
}
}
</script>

View File

@@ -0,0 +1,71 @@
<template>
<v-dialog
v-model="dialog"
max-width="30%"
>
<v-card>
<v-card-title
class="headline error pt-2 pb-2"
primary-title
dark
>
Peringatan !
</v-card-title>
<v-card-text class="pt-2 pb-2">
<v-layout row>
<v-flex xs12 d-flex>
<v-layout row>
<v-flex pb-1 xs12>
<v-layout row>
<v-flex v-html="xmsg" pt-2 pr-2 xs12>
</v-flex>
</v-layout>
</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="primary"
flat
@click="closeError()"
>
OK
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
</template>
<style scoped>
</style>
<script>
module.exports = {
props : ['status', 'msg'],
computed : {
xmsg() {
return this.msg
},
dialog: {
get() {
return this.status
},
set(val) {
this.$emit('close-dialog-error')
}
}
},
methods: {
closeError() {
this.$emit('close-dialog-error')
}
}
}
</script>

70
common/oneDialogInfo.vue Normal file
View File

@@ -0,0 +1,70 @@
<template>
<v-dialog
v-model="dialog"
max-width="30%"
>
<v-card>
<v-card-title
class="headline info pt-2 pb-2"
primary-title
>
Informasi
</v-card-title>
<v-card-text class="pt-2 pb-2">
<v-layout row>
<v-flex xs12 d-flex>
<v-layout row>
<v-flex pb-1 xs12>
<v-layout row>
<v-flex v-html="xmsg" pt-2 pr-2 xs12>
</v-flex>
</v-layout>
</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="primary"
flat
@click="closeInfo()"
>
OK
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
</template>
<style scoped>
</style>
<script>
module.exports = {
props : ['status', 'msg'],
computed : {
xmsg() {
return this.msg
},
dialog: {
get() {
return this.status
},
set(val) {
this.$emit('close-dialog-info')
}
}
},
methods: {
closeInfo() {
this.$emit('close-dialog-info')
}
}
}
</script>

View File

@@ -0,0 +1,63 @@
<template>
<v-dialog
v-model="dialog"
scrollable fullscreen
persistent
transition="dialog-transition"
>
<v-card
color="transparent"
dark
>
<v-card-text>
<v-layout row wrap class="vertical-center">
<v-flex xs4>&nbsp;</v-flex>
<v-flex xs4>
<v-card color="primary">
<v-card-text>
Mohon tunggu sebentar ...
<v-progress-linear
indeterminate
color="white"
class="mb-0"
></v-progress-linear>
</v-card-text>
</v-card>
</v-flex>
<v-flex xs4>&nbsp;</v-flex>
</v-layout>
</v-card-text>
</v-card>
</v-dialog>
</template>
<style>
.transparent {
background-color: rgba(255, 255, 255, 0.35) !important;
border-color: transparent!important;
}
.vertical-center {
margin-top: 20%
}
</style>
<script>
module.exports = {
data () {
return {
}
},
computed : {
dialog : {
get () { return this.$store.state.dialog_loading },
set (v) { this.$store.commit('update_dialog_loading', v) }
}
}
}
</script>

76
common/oneDialogPrint.vue Normal file
View File

@@ -0,0 +1,76 @@
<template>
<v-dialog
v-model="dialog"
width="1000px"
>
<v-card>
<v-card-title
class="headline grey lighten-2 pt-2 pb-2"
primary-title
>
Laporan
</v-card-title>
<v-card-text class="pt-2 pb-2">
<v-layout>
<v-flex xs12>
<object data="https://anggrek.aplikasi.web.id/one-ui/test/vuex/common/under-cons.pdf"
width="100%"></object>
</v-flex>
</v-layout>
</v-card-text>
<v-divider></v-divider>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn
color="primary"
@click="dialog = false"
flat
>
Tutup
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
</template>
<style scoped>
</style>
<script>
module.exports = {
components : {
},
methods : {
tuing: function() {
alert('x')
},
processMee () {
this.$store.dispatch('order/process')
}
},
computed : {
dialog: {
get() {
return this.$store.state.order.confirm_process_dialog_is_active;
},
set(val) {
this.$store.commit('order/update_confirm_process_dialog_is_active', val);
}
},
queue_number () {
return this.$store.state.order.queue_number
}
}
}
</script>

View File

@@ -0,0 +1,71 @@
<template>
<div class="text-xs-center">
<v-dialog
v-model="dialog"
:width="xwidth"
persistent
>
<v-card >
<v-card-title
class="headline grey lighten-2"
primary-title
>
{{xtitle}}
</v-card-title>
<v-card-text >
<object style="overflow: hidden;" width="100%" :height="xheight" :data="xurl"></object>
</v-card-text>
<v-divider></v-divider>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn
color="primary"
flat
@click="closeDialog()"
>
Tutup
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
</div>
</template>
<style scoped>
</style>
<script>
module.exports = {
props : ['title','width','height','status','urlprint'],
computed : {
dialog: {
get() {
return this.status
},
set(val) {
this.status = val
}
},
xurl(){
return this.urlprint
},
xwidth(){
return this.width
},
xheight(){
return this.height
},
xtitle(){
return this.title
}
},
methods: {
closeDialog() {
this.$emit('close-dialog-print')
}
}
}
</script>

View File

@@ -0,0 +1,121 @@
<template>
<v-layout>
<v-checkbox
v-model="init_value"
@change="changeLahBrooo"
hide-details class="shrink mr-2"
></v-checkbox>
<v-text-field
:label="__label"
placeholder="Alasan"
outline
:disabled=x_disabled
:error-messages="init_error ? x_error_messages : ''"
:error_count="init_error ? x_error_count : 0 "
:error=init_error
:hide-details=!init_error
v-model=init_note
></v-text-field>
</v-layout>
</template>
<script>
module.exports = {
props : ['label', 'value', 'is_error', 'note'],
mounted: function() {
this.$nextTick( function() {
this.init_note = this.note ? this.note : "";
this.init_value = this.value;
})
},
data () {
return {
init_value : false,
init_note : ""
}
},
methods : {
changeLahBrooo (n, o) {
if (n) {
this.init_note = "";
// this.init_error = false;
} /* else {
if (this.init_note.length < 1)
this.init_error = true;
else
this.init_error = false;
}*/
var prm = {checked: n, note: this.init_note, error: this.init_error};
this.$emit('x_change',prm);
console.log('emit change');
// this.x_note = "aaaaaaaaaaaaaaaaaaa"
// alert(this.x_note)
}
},
computed : {
__label () {
if (this.label)
return this.label;
return "";
},
x_disabled () {
// return false;
if (this.init_value === "true" || this.init_value === true)
return true;
return false;
},
init_error () {
if ((this.init_value === "false" || this.init_value === false) && this.init_note.length < 1)
return true;
else {
// this.x_note = "";
return false;
}
},
x_error_count () {
// return 0;
if (this.init_error)
return 1;
return 0;
},
x_error_messages () {
if (this.init_error)
return ["Kolom ini harus diisi !"];
return [];
},
x_note () {
if (this.note)
return this.note;
return "";
}
}
}
</script>

View File

@@ -0,0 +1,125 @@
<template>
<v-layout>
<v-checkbox
v-model="init_value"
@change="checkbox_change"
hide-details class="shrink mr-2"
:disabled="init_disabled"
></v-checkbox>
<v-text-field
:label="__label"
placeholder="Alasan"
outline
:disabled="x_disabled || init_disabled"
:error-messages="init_error && !init_disabled ? x_error_messages : ''"
:error_count="init_error && !init_disabled ? x_error_count : 0 "
:error="init_error && !init_disabled"
:hide-details=!init_error
v-model=init_note
@input="note_change"
></v-text-field>
</v-layout>
</template>
<script>
module.exports = {
props : ['label', 'value', 'is_error', 'note', 'disabled'],
mounted: function() {
this.$nextTick( function() {
this.init_note = this.note ? this.note : "";
this.init_value = this.value;
})
},
data () {
return {
init_value : false,
init_note : ""
}
},
methods : {
checkbox_change (n, o) {
if (n) {
this.init_note = "";
}
var prm = {checked: n, note: this.init_note, error: this.init_error};
this.$emit('x_change', prm);
this.$emit('change', prm);
// console.log('"' + this.label + '" changed value to : ' + n);
},
note_change (n) {
let prm = { checked: this.init_value, note: n, error: this.init_error };
this.$emit('change', prm);
this.$emit('input', n);
}
},
computed : {
__label () {
if (this.label)
return this.label;
return "";
},
x_disabled () {
// return false;
if (this.init_value === "true" || this.init_value === true)
return true;
return false;
},
init_error () {
if ((this.init_value === "false" || this.init_value === false) && this.init_note.length < 1)
return true;
else {
// this.x_note = "";
return false;
}
},
x_error_count () {
// return 0;
if (this.init_error)
return 1;
return 0;
},
x_error_messages () {
if (this.init_error)
return ["Kolom ini harus diisi !"];
return [];
},
x_note () {
if (this.note)
return this.note;
return "";
},
init_disabled () {
return this.disabled ? this.disabled : false
}
}
}
</script>

View File

@@ -0,0 +1,126 @@
<template>
<div>
<v-layout row v-if="xtype == 'reguler'">
<v-flex pb-1 xs12>
<v-layout row>
<v-flex pl-3 pt-2 xs1>
<v-checkbox
v-model="xcbx"
hide-details
></v-checkbox>
</v-flex>
<v-flex pt-2 xs8 >
<v-text-field
:label="xlabel"
:disabled="xdisabled"
:error="xerror"
:error-messages="xerror ? xerrormessages : ''"
:error_count="xerror ? xerrorcount : 0 "
:hide-details=!xerror
placeholder="Alasan"
outline
v-model="xtxt"
></v-text-field>
</v-flex>
</v-layout>
</v-flex>
</v-layout>
<v-layout v-else-if="xtype == 'indigo'">
<v-flex pb-1 xs12>
<v-layout row>
<v-flex pl-3 pt-2 xs1 class="indigo lighten-5">
<v-checkbox
v-model="xcbx"
hide-details
></v-checkbox>
</v-flex>
<v-flex pt-2 pb-2 xs8 class="indigo lighten-5">
<v-text-field
:label="xlabel"
:disabled="xdisabled"
:error="xerror"
:error-messages="xerror ? xerrormessages : ''"
:error_count="xerror ? xerrorcount : 0 "
:hide-details=!xerror
placeholder="Alasan"
outline
v-model="xtxt"
></v-text-field>
</v-flex>
<v-flex class="indigo lighten-5" pt-3 xs3>
<v-layout align-center justify-center row>
<v-icon large @click="deleteData()" color="red">delete</v-icon>
</v-layout>
</v-flex>
</v-layout>
</v-flex>
</v-layout>
</div>
</template>
<script>
module.exports = {
props : ['xdatalabel','xdatacbx','xdatatxt','xdatatype'],
computed :{
xtype : function(type) {
return this.xdatatype
},
xcbx: {
get() {
return this.xdatacbx
},
set(val) {
if(val == true && this.xdatatxt !== "")
this.$emit('update-data-txt', "")
this.$emit('update-data-cbx', val)
}
},
xtxt: {
get() {
return this.xdatatxt
},
set(val) {
this.$emit('update-data-txt', val)
}
},
xlabel(){
if (this.xdatalabel)
return this.xdatalabel;
return "";
},
xdisabled () {
if (this.xcbx === "true" || this.xcbx === true)
return true;
return false;
},
xerror () {
if ((this.xcbx === "false" || this.xcbx === false) && this.xtxt.length < 1)
return true;
else {
return false;
}
},
xerrormessages () {
if (this.xerror)
return ["Alasan harus diisi !"];
return [];
},
xerrorcount () {
if (this.xerror)
return 1;
return 0;
}
},
methods: {
deleteData() {
this.$emit('update-data-delete', true)
}
}
}
</script>

View File

@@ -0,0 +1,72 @@
<template>
<v-layout>
<v-checkbox
v-model="init_value"
@change="changeCbx"
hide-details class="shrink mr-2"
></v-checkbox>
<v-text-field
:label="__label"
outline
v-model=init_note
></v-text-field>
</v-layout>
</template>
<script>
module.exports = {
props : ['label', 'value', 'note'],
mounted: function() {
this.$nextTick( function() {
this.init_note = this.note ? this.note : "";
this.init_value = this.value;
})
},
data () {
return {
init_value : false,
init_note : ""
}
},
methods : {
changeCbx (n, o) {
/* if (n) {
this.init_note = "";
}
*/
var prm = {checked: n, note: this.init_note};
this.$emit('x_change',prm);
}
},
computed : {
__label () {
if (this.label)
return this.label;
return "";
},
__placeholder () {
if (this.placeholder)
return this.placeholder;
return "";
},
x_disabled () {
if (this.init_value === "true" || this.init_value === true)
return true;
return false;
},
x_note () {
if (this.note)
return this.note;
return "";
}
}
}
</script>

View File

@@ -0,0 +1,84 @@
<template>
<div>
<v-layout>
<v-checkbox
v-model="xcbx"
hide-details class="shrink mr-2"
></v-checkbox>
<v-text-field
:label="xlabel"
:disabled="xdisabled"
:error="xerror"
:error-messages="xerror ? xerrormessages : ''"
:error_count="xerror ? xerrorcount : 0 "
:hide-details=!xerror
placeholder="Alasan"
outline
v-model="xtxt"
></v-text-field>
</v-layout>
</div>
</template>
<script>
module.exports = {
props : ['xdatalabel','xdatacbx','xdatatxt'],
computed :{
xcbx: {
get() {
return this.xdatacbx
},
set(val) {
if(val == true && this.xdatatxt !== "")
this.$emit('update-data-txt', "")
this.$emit('update-data-cbx', val)
}
},
xtxt: {
get() {
return this.xdatatxt
},
set(val) {
this.$emit('update-data-txt', val)
}
},
xlabel(){
if (this.xdatalabel)
return this.xdatalabel;
return "";
},
xdisabled () {
if (this.xcbx === "true" || this.xcbx === true)
return true;
return false;
},
xerror () {
if ((this.xcbx === "false" || this.xcbx === false) && this.xtxt.length < 1)
return true;
else {
return false;
}
},
xerrormessages () {
if (this.xerror)
return ["Alasan harus diisi !"];
return [];
},
xerrorcount () {
if (this.xerror)
return 1;
return 0;
}
}
}
</script>

View File

@@ -0,0 +1,82 @@
<template>
<div>
<v-layout>
<v-checkbox
v-model="xcbx"
hide-details class="shrink mr-2"
></v-checkbox>
<v-text-field
:label="xlabel"
:disabled="xdisabled"
:error="xerror"
:error-messages="xerror ? xerrormessages : ''"
:error_count="xerror ? xerrorcount : 0 "
:hide-details=!xerror
placeholder="Alasan"
outline
v-model="xtxt"
></v-text-field>
</v-layout>
</div>
</template>
<script>
module.exports = {
props : ['xdatalabel','xdatacbx','xdatatxt'],
computed :{
xcbx: {
get() {
return this.xdatacbx
},
set(val) {
this.$emit('update-data-cbx', val)
}
},
xtxt: {
get() {
return this.xdatatxt
},
set(val) {
this.$emit('update-data-txt', val)
}
},
xlabel(){
if (this.xdatalabel)
return this.xdatalabel;
return "";
},
xdisabled () {
if (this.xcbx === "true" || this.xcbx === true)
return true;
return false;
},
xerror () {
if ((this.xcbx === "false" || this.xcbx === false) && this.xtxt.length < 1)
return true;
else {
return false;
}
},
xerrormessages () {
if (this.xerror)
return ["Alasan harus diisi !"];
return [];
},
xerrorcount () {
if (this.xerror)
return 1;
return 0;
}
}
}
</script>

View File

@@ -0,0 +1,31 @@
<template>
<v-layout>
<input type="text" v-model="xdata" />
</v-layout>
</template>
<script>
module.exports = {
props : ['textdata'],
methods: {
changeDataX(item) {
this.$emit('update-data-x', item)
}
},
computed :{
xdata: {
get() {
return this.textdata
},
set(val) {
this.$emit('update-data-x', val)
}
}
}
}
</script>

View File

@@ -0,0 +1,80 @@
<template>
<v-layout>
<v-checkbox
v-model="xcbx"
hide-details class="shrink mr-2"
></v-checkbox>
<v-text-field
:label="xlabel"
:disabled="xdisabled"
:error="xerror"
:error-messages="xerror ? xerrormessages : ''"
:error_count="xerror ? xerrorcount : 0 "
:hide-details=!xerror
placeholder="Alasan"
outline
v-model="xtxt"
></v-text-field>
</v-layout>
</template>
<script>
module.exports = {
props : ['xdatalabel','xdatacbx','xdatatxt'],
computed :{
xcbx: {
get() {
return this.xdatacbx
},
set(val) {
this.$emit('update-data-cbx', val)
}
},
xtxt: {
get() {
return this.xdatatxt
},
set(val) {
this.$emit('update-data-txt', val)
}
},
xlabel(){
if (this.xdatalabel)
return this.xdatalabel;
return "";
},
xdisabled () {
if (this.xcbx === "true" || this.xcbx === true)
return true;
return false;
},
xerror () {
if ((this.xcbx === "false" || this.xcbx === false) && this.xtxt.length < 1)
return true;
else {
return false;
}
},
xerrormessages () {
if (this.xerror)
return ["Alasan harus diisi !"];
return [];
},
xerrorcount () {
if (this.xerror)
return 1;
return 0;
}
}
}
</script>

BIN
common/under-cons.pdf Normal file

Binary file not shown.