Merge branch 'master' of bitbucket.org:tiscyn/smartproc-fe
This commit is contained in:
commit
83585f5ea7
2062
package-lock.json
generated
2062
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -33,6 +33,7 @@ export default {
|
||||
username: data.data.username,
|
||||
email: data.data.email,
|
||||
role: data.data.role,
|
||||
menus: data.data.menus,
|
||||
avatarUrl: 'https://js.devexpress.com/Demos/WidgetsGallery/JSDemos/images/employees/06.png',
|
||||
};
|
||||
|
||||
|
@ -24,58 +24,57 @@
|
||||
save-row-changes="Simpan"
|
||||
cancel-row-changes="Batal"
|
||||
></DxTexts>
|
||||
<DxForm label-location="top">
|
||||
<DxItem dataField="nomor">
|
||||
<DxForm label-location="top" :col-count="4">
|
||||
<DxItem dataField="nomor" :col-span="2">
|
||||
<DxRequiredRule message="Masukan Nomor PRK" />
|
||||
</DxItem>
|
||||
<DxItem dataField="metodePenyampaianId">
|
||||
<DxItem dataField="metodePenyampaianId" :col-span="2">
|
||||
<DxRequiredRule message="Pilih Metode Penyampaian Dokumen Penawaran" />
|
||||
</DxItem>
|
||||
<DxItem dataField="namaPengadaan">
|
||||
<DxRequiredRule message="Masukan Nama Pengadaan" />
|
||||
<DxItem dataField="namaPengadaan" :col-span="2">
|
||||
<DxRequiredRule message="Masukan Nama Pengadaan" :col-span="2"/>
|
||||
</DxItem>
|
||||
<DxItem dataField="supplyPositioningMatrixId">
|
||||
<DxItem dataField="supplyPositioningMatrixId" :col-span="2">
|
||||
<DxRequiredRule message="Pilih Supply Positioning Matrix" />
|
||||
</DxItem>
|
||||
<DxItem dataField="unitInisiatorId">
|
||||
<DxItem dataField="unitInisiatorId" :col-span="2">
|
||||
<DxRequiredRule message="Pilih Nama Divisi/Inisiator Pengadaan" />
|
||||
</DxItem>
|
||||
<DxItem dataField="jenisKontrakId">
|
||||
<DxItem dataField="jenisKontrakId" :col-span="2">
|
||||
<DxRequiredRule message="Pilih Jenis Perjanjian / Kontrak" />
|
||||
</DxItem>
|
||||
<DxItem dataField="lokasiId">
|
||||
<DxItem dataField="lokasiId" :col-span="2">
|
||||
<DxRequiredRule message="Pilih Lokasi Pengadaan" />
|
||||
</DxItem>
|
||||
<DxItem dataField="sumberDanaId">
|
||||
<DxItem dataField="sumberDanaId" :col-span="2">
|
||||
<DxRequiredRule message="Pilih Sumber Dana" />
|
||||
</DxItem>
|
||||
<DxItem dataField="jenisPengadaanId">
|
||||
<DxItem dataField="jenisPengadaanId" :col-span="2">
|
||||
<DxRequiredRule message="Pilih Jenis Pengadaan" />
|
||||
</DxItem>
|
||||
<DxItem dataField="rencanaTanggal">
|
||||
<DxRequiredRule message="Masukan Tanggal Rencana" />
|
||||
</DxItem>
|
||||
<DxItem dataField="targetTanggal">
|
||||
<DxRequiredRule message="Masukan Tanggak COD" />
|
||||
<DxRequiredRule message="Masukan Tanggal COD" />
|
||||
</DxItem>
|
||||
<DxItem dataField="metodePengadaanId">
|
||||
<DxItem dataField="metodePengadaanId" :col-span="2">
|
||||
<DxRequiredRule message="Pilih Metode Pengadaan" />
|
||||
</DxItem>
|
||||
<DxItem dataField="pagu">
|
||||
<DxItem dataField="pagu" :col-span="2">
|
||||
<DxRequiredRule message="Masukkan Nilai Pagu Anggaran" />
|
||||
</DxItem>>
|
||||
<DxItem dataField="strategiPengadaanId">
|
||||
<DxItem dataField="strategiPengadaanId" :col-span="2">
|
||||
<DxRequiredRule message="Pilih Strategi Pengadaan" />
|
||||
</DxItem>
|
||||
<DxItem dataField="hpe">
|
||||
<DxItem dataField="hpe" :col-span="2">
|
||||
<DxRequiredRule message="Masukkan Nilai HPE" />
|
||||
</DxItem>
|
||||
</DxForm>
|
||||
<DxPopup
|
||||
:hide-on-outside-click="true"
|
||||
:show-title="true"
|
||||
:width="800"
|
||||
:height="600"
|
||||
|
||||
title="Form DRP Pengadaan">
|
||||
</DxPopup>
|
||||
</DxEditing>
|
||||
@ -100,24 +99,49 @@
|
||||
<DxFilterRow :visible="false" />
|
||||
<DxColumn cell-template="row-cell-template" caption="No" :width="45"></DxColumn>
|
||||
<DxColumn data-field="nomor" caption="Nomor PRK"></DxColumn>
|
||||
<DxColumn data-field="metodePenyampaianId" caption="Metode Penyampaian Dokumen Penawaran"></DxColumn>
|
||||
|
||||
|
||||
|
||||
<DxColumn data-field="metodePenyampaianId" caption="Metode Penyampaian Dokumen Penawaran">
|
||||
<DxLookup display-expr="metodePenyampaian" value-expr="id" :data-source="metodepenyampaian"/>
|
||||
</DxColumn>
|
||||
<DxColumn data-field="namaPengadaan" caption="Nama Pengadaan"></DxColumn>
|
||||
<DxColumn data-field="lokasiId" caption="Lokasi Pengadaan">
|
||||
<DxLookup display-expr="instansi" value-expr="id" :data-source="instansis" :search-enabled="true" />
|
||||
<DxLookup display-expr="lokasi" value-expr="id" :data-source="lokasi"/>
|
||||
</DxColumn>
|
||||
<DxColumn data-field="jenisPengadaanId" caption="Jenis Pengadaan">
|
||||
<DxLookup display-expr="jenisPengadaan" value-expr="id" :data-source="jenispengadaan"/>
|
||||
</DxColumn>
|
||||
<DxColumn data-field="unitInisiatorId" caption="Divisi / Unit Inisiator Pengadaan">
|
||||
<DxLookup display-expr="unitInisiator" value-expr="id" :data-source="unitinisiator"/>
|
||||
</DxColumn>
|
||||
<DxColumn data-field="pagu" caption="Pagu Anggaran (Rp)">
|
||||
<DxFormat
|
||||
type="fixedPoint"
|
||||
format="$ #,##0.##"
|
||||
:precision="2"
|
||||
/>
|
||||
</DxColumn>
|
||||
<DxColumn data-field="sumberDanaId" caption="Sumber Dana">
|
||||
<DxLookup display-expr="sumberDana" value-expr="id" :data-source="sumberdana"/>
|
||||
</DxColumn>
|
||||
<DxColumn data-field="supplyPositioningMatrixId" caption="Supply Positioning Matrix">
|
||||
<DxLookup display-expr="supplyPositioningMatrix" value-expr="id" :data-source="supplypositioningmatrix"/>
|
||||
</DxColumn>
|
||||
<DxColumn data-field="metodePengadaanId" caption="Metode Pengadaan">
|
||||
<DxLookup display-expr="metodePengadaan" value-expr="id" :data-source="metodepengadaan"/>
|
||||
</DxColumn>
|
||||
<DxColumn data-field="jenisKontrakId" caption="Jenis Perjanjian/Kontrak">
|
||||
<DxLookup display-expr="jenisKontrak" value-expr="id" :data-source="jeniskontrak"/>
|
||||
</DxColumn>
|
||||
<DxColumn data-field="strategiPengadaanId" caption="Strategi Pengadaan">
|
||||
<DxLookup display-expr="strategiPengadaan" value-expr="id" :data-source="strategipengadaan"/>
|
||||
</DxColumn>
|
||||
<DxColumn data-field="rencanaTanggal" caption="Rencana Pelaksanaan Pengadaan" data-type="date"></DxColumn>
|
||||
<DxColumn data-field="targetTanggal" caption="Target COD" data-type="date"></DxColumn>
|
||||
<DxColumn data-field="hpe" caption="Nilai HPE (Rp)">
|
||||
<DxFormat
|
||||
type="fixedPoint"
|
||||
:precision="2"
|
||||
/>
|
||||
</DxColumn>
|
||||
<DxColumn data-field="unitInisiatorId" caption="Divisi / Unit Inisiator Pengadaan"></DxColumn>
|
||||
<DxColumn data-field="pagu" caption="Pagu Anggaran (Rp)"></DxColumn>
|
||||
<DxColumn data-field="sumberDanaId" caption="Sumber Dana"></DxColumn>
|
||||
<DxColumn data-field="supplyPositioningMatrixId" caption="Supply Positioning Matrix"></DxColumn>
|
||||
<DxColumn data-field="metodePengadaanId" caption="Metode Pengadaan"></DxColumn>
|
||||
<DxColumn data-field="jenisKontrakId" caption="Jenis Perjanjian/Kontrak"></DxColumn>
|
||||
<DxColumn data-field="strategiPengadaanId" caption="Strategi Pengadaan"></DxColumn>
|
||||
<DxColumn data-field="rencanaTanggal" caption="Rencana Pelaksanaan Pengadaan"></DxColumn>
|
||||
<DxColumn data-field="targetTanggal" caption="Target COD"></DxColumn>
|
||||
<DxColumn data-field="hpe" caption="Nilai HPE (Rp)"></DxColumn>
|
||||
<DxColumnFixing :enabled="true" />
|
||||
<DxColumn :allow-fixing="false" type="buttons" caption="Aksi">
|
||||
<DxButton name="edit"/>
|
||||
@ -140,7 +164,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import DxDataGrid, {
|
||||
import {
|
||||
DxDataGrid,
|
||||
DxEditing,
|
||||
DxItem,
|
||||
DxForm,
|
||||
@ -154,41 +179,162 @@ import DxDataGrid, {
|
||||
DxTexts,
|
||||
DxRequiredRule,
|
||||
DxLookup,
|
||||
DxColumnFixing
|
||||
DxColumnFixing,
|
||||
DxFormat
|
||||
} from "devextreme-vue/data-grid";
|
||||
import CustomStore from "devextreme/data/custom_store";
|
||||
|
||||
//const URL = process.env.VUE_APP_ROOT_API+'/drp/pengadaan';
|
||||
const URL = process.env.VUE_APP_ROOT_API+'/jenisanggaran';
|
||||
const URL_instansi = process.env.VUE_APP_ROOT_API+'/instansi';
|
||||
const URL = process.env.VUE_APP_ROOT_API+'/drp/pengadaan';
|
||||
const URL_metodepenyampaian = process.env.VUE_APP_ROOT_API+'/metodepenyampaian';
|
||||
const URL_supplypositioningmatrix = process.env.VUE_APP_ROOT_API+'/supplypositioningmatrix';
|
||||
const URL_unitinisiator = process.env.VUE_APP_ROOT_API+'/unitinisiator';
|
||||
const URL_jeniskontrak = process.env.VUE_APP_ROOT_API+'/jeniskontrak';
|
||||
const URL_lokasi = process.env.VUE_APP_ROOT_API+'/lokasi';
|
||||
const URL_sumberdana = process.env.VUE_APP_ROOT_API+'/sumberdana';
|
||||
const URL_jenispengadaan = process.env.VUE_APP_ROOT_API+'/jenispengadaan';
|
||||
const URL_metodepengadaan = process.env.VUE_APP_ROOT_API+'/metodepengadaan';
|
||||
const URL_strategipengadaan = process.env.VUE_APP_ROOT_API+'/strategipengadaan';
|
||||
|
||||
const instansiOptions = new CustomStore({
|
||||
const metodepenyampaianOptions = new CustomStore({
|
||||
key: 'id',
|
||||
|
||||
load:() => {
|
||||
return fetch(URL_instansi+process.env.VUE_APP_PAGE_SIZE)
|
||||
return fetch(URL_metodepenyampaian+process.env.VUE_APP_PAGE_SIZE)
|
||||
.then((response) => response.json())
|
||||
.then(response => {
|
||||
console.log(response.data);
|
||||
return {
|
||||
data: response.data
|
||||
};
|
||||
})
|
||||
// .then(data => {
|
||||
// console.log(JSON.parse(data));
|
||||
// })
|
||||
.catch(() => { throw new Error('Terdapat kesalahan memuat data'); });
|
||||
},
|
||||
|
||||
byKey: (key) => {
|
||||
return fetch(URL_instansi+'/' + key)
|
||||
return fetch(URL_metodepenyampaian+'/' + key)
|
||||
.then((response) => response.json())
|
||||
.catch(() => { throw new Error('Terdapat kesalahan memuat data'); });
|
||||
}
|
||||
});
|
||||
|
||||
const supplypositioningmatrixOptions = new CustomStore({
|
||||
key: 'id',
|
||||
|
||||
load:() => {
|
||||
return fetch(URL_supplypositioningmatrix+process.env.VUE_APP_PAGE_SIZE)
|
||||
.then((response) => response.json())
|
||||
.catch(() => { throw new Error('Terdapat kesalahan memuat data'); });
|
||||
},
|
||||
|
||||
byKey: (key) => {
|
||||
return fetch(URL_supplypositioningmatrix+'/' + key)
|
||||
.then((response) => response.json())
|
||||
.catch(() => { throw new Error('Terdapat kesalahan memuat data'); });
|
||||
}
|
||||
});
|
||||
|
||||
const unitinisiatorOptions = new CustomStore({
|
||||
key: 'id',
|
||||
|
||||
load:() => {
|
||||
return fetch(URL_unitinisiator+process.env.VUE_APP_PAGE_SIZE)
|
||||
.then((response) => response.json())
|
||||
.catch(() => { throw new Error('Terdapat kesalahan memuat data'); });
|
||||
},
|
||||
|
||||
byKey: (key) => {
|
||||
return fetch(URL_unitinisiator+'/' + key)
|
||||
.then((response) => response.json())
|
||||
.catch(() => { throw new Error('Terdapat kesalahan memuat data'); });
|
||||
}
|
||||
});
|
||||
|
||||
const jeniskontrakOptions = new CustomStore({
|
||||
key: 'id',
|
||||
|
||||
load:() => {
|
||||
return fetch(URL_jeniskontrak+process.env.VUE_APP_PAGE_SIZE)
|
||||
.then((response) => response.json())
|
||||
.catch(() => { throw new Error('Terdapat kesalahan memuat data'); });
|
||||
},
|
||||
|
||||
byKey: (key) => {
|
||||
return fetch(URL_jeniskontrak+'/' + key)
|
||||
.then((response) => response.json())
|
||||
.catch(() => { throw new Error('Terdapat kesalahan memuat data'); });
|
||||
}
|
||||
});
|
||||
|
||||
const lokasiOptions = new CustomStore({
|
||||
key: 'id',
|
||||
|
||||
load:() => {
|
||||
return fetch(URL_lokasi+process.env.VUE_APP_PAGE_SIZE)
|
||||
.then((response) => response.json())
|
||||
.catch(() => { throw new Error('Terdapat kesalahan memuat data'); });
|
||||
},
|
||||
|
||||
byKey: (key) => {
|
||||
return fetch(URL_lokasi+'/' + key)
|
||||
.then((response) => response.json())
|
||||
.catch(() => { throw new Error('Terdapat kesalahan memuat data'); });
|
||||
}
|
||||
});
|
||||
|
||||
const sumberdanaOptions = new CustomStore({
|
||||
key: 'id',
|
||||
|
||||
load:() => {
|
||||
return fetch(URL_sumberdana+process.env.VUE_APP_PAGE_SIZE)
|
||||
.then((response) => response.json())
|
||||
.catch(() => { throw new Error('Terdapat kesalahan memuat data'); });
|
||||
},
|
||||
|
||||
byKey: (key) => {
|
||||
return fetch(URL_sumberdana+'/' + key)
|
||||
.then((response) => response.json())
|
||||
.catch(() => { throw new Error('Terdapat kesalahan memuat data'); });
|
||||
}
|
||||
});
|
||||
|
||||
const jenispengadaanOptions = new CustomStore({
|
||||
key: 'id',
|
||||
|
||||
load:() => {
|
||||
return fetch(URL_jenispengadaan+process.env.VUE_APP_PAGE_SIZE)
|
||||
.then((response) => response.json())
|
||||
.catch(() => { throw new Error('Terdapat kesalahan memuat data'); });
|
||||
},
|
||||
|
||||
byKey: (key) => {
|
||||
return fetch(URL_jenispengadaan+'/' + key)
|
||||
.then((response) => response.json())
|
||||
.catch(() => { throw new Error('Terdapat kesalahan memuat data'); });
|
||||
}
|
||||
});
|
||||
|
||||
const metodepengadaanOptions = new CustomStore({
|
||||
key: 'id',
|
||||
|
||||
load:() => {
|
||||
return fetch(URL_metodepengadaan+process.env.VUE_APP_PAGE_SIZE)
|
||||
.then((response) => response.json())
|
||||
.catch(() => { throw new Error('Terdapat kesalahan memuat data'); });
|
||||
},
|
||||
|
||||
byKey: (key) => {
|
||||
return fetch(URL_metodepengadaan+'/' + key)
|
||||
.then((response) => response.json())
|
||||
.catch(() => { throw new Error('Terdapat kesalahan memuat data'); });
|
||||
}
|
||||
});
|
||||
|
||||
const strategipengadaanOptions = new CustomStore({
|
||||
key: 'id',
|
||||
|
||||
load:() => {
|
||||
return fetch(URL_strategipengadaan+process.env.VUE_APP_PAGE_SIZE)
|
||||
.then((response) => response.json())
|
||||
.catch(() => { throw new Error('Terdapat kesalahan memuat data'); });
|
||||
},
|
||||
|
||||
byKey: (key) => {
|
||||
return fetch(URL_strategipengadaan+'/' + key)
|
||||
.then((response) => response.json())
|
||||
.then(response => {
|
||||
console.log(response.instansi);
|
||||
return {
|
||||
data: response.instansi
|
||||
};
|
||||
})
|
||||
.catch(() => { throw new Error('Terdapat kesalahan memuat data'); });
|
||||
}
|
||||
});
|
||||
@ -251,14 +397,23 @@ export default {
|
||||
DxTexts,
|
||||
DxRequiredRule,
|
||||
DxLookup,
|
||||
DxColumnFixing
|
||||
DxColumnFixing,
|
||||
DxFormat
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
//jsonUrl: URL,
|
||||
dataSource,
|
||||
instansis: instansiOptions,
|
||||
metodepenyampaian: metodepenyampaianOptions,
|
||||
supplypositioningmatrix: supplypositioningmatrixOptions,
|
||||
unitinisiator: unitinisiatorOptions,
|
||||
jeniskontrak: jeniskontrakOptions,
|
||||
lokasi: lokasiOptions,
|
||||
sumberdana: sumberdanaOptions,
|
||||
jenispengadaan: jenispengadaanOptions,
|
||||
metodepengadaan: metodepengadaanOptions,
|
||||
strategipengadaan: strategipengadaanOptions
|
||||
}
|
||||
},
|
||||
}
|
||||
|
@ -484,13 +484,13 @@ const dataSource = new CustomStore({
|
||||
},
|
||||
|
||||
insert: (values) => {
|
||||
return fetch(URL, {
|
||||
return fetch(URL+'/tahun', {
|
||||
method: "POST",
|
||||
body: JSON.stringify(values),
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
});
|
||||
})
|
||||
},
|
||||
|
||||
update: (key, values) => {
|
||||
@ -607,9 +607,7 @@ export default {
|
||||
this.isShowButton = true;
|
||||
},
|
||||
linkDetail() {
|
||||
this.popupVisible = true;
|
||||
this.popupTitle = "Lihat Dokumen Pendukung";
|
||||
this.isShowButton = false;
|
||||
location.href='#/drp/drp-pengadaan';
|
||||
},
|
||||
linkKirim($event) {
|
||||
console.log("event: ", $event.row.values);
|
||||
|
@ -43,8 +43,13 @@
|
||||
<DxRequiredRule message="Role harus dipilih" />
|
||||
</DxItem>
|
||||
<DxItem dataField="isActive" :col-span="2" editor-type="dxCheckBox"/>
|
||||
<DxItem dataField="email" :editor-options="{ placeholder: 'Masukan Email' }"></DxItem>
|
||||
<DxItem dataField="noTelepon" :editor-options="{ placeholder: 'Masukan No. Telepon' }"></DxItem>
|
||||
<DxItem dataField="email" :editor-options="{ placeholder: 'Masukan Email' }">
|
||||
<DxRequiredRule message="Isikan alamat email yang valid" />
|
||||
<DxEmailRule message="Email tidak valid"/>
|
||||
</DxItem>
|
||||
<DxItem dataField="noTelepon" :editor-options="{ placeholder: 'Masukan No. Telepon' }">
|
||||
<DxRequiredRule message="Isikan no telepon" />
|
||||
</DxItem>
|
||||
</DxForm>
|
||||
<DxPopup
|
||||
:hide-on-outside-click="true"
|
||||
@ -106,7 +111,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import DxDataGrid, {
|
||||
import {
|
||||
DxDataGrid,
|
||||
DxEditing,
|
||||
DxItem,
|
||||
DxForm,
|
||||
@ -119,7 +125,8 @@ import DxDataGrid, {
|
||||
DxToolbar,
|
||||
DxTexts,
|
||||
DxRequiredRule,
|
||||
DxLookup
|
||||
DxLookup,
|
||||
DxEmailRule
|
||||
} from "devextreme-vue/data-grid";
|
||||
import CustomStore from "devextreme/data/custom_store";
|
||||
|
||||
@ -141,21 +148,12 @@ const instansiOptions = new CustomStore({
|
||||
data: response.data
|
||||
};
|
||||
})
|
||||
// .then(data => {
|
||||
// console.log(JSON.parse(data));
|
||||
// })
|
||||
.catch(() => { throw new Error('Terdapat kesalahan memuat data'); });
|
||||
},
|
||||
|
||||
byKey: (key) => {
|
||||
return fetch(URL_instansi+'/' + key)
|
||||
.then((response) => response.json())
|
||||
.then(response => {
|
||||
console.log(response.instansi);
|
||||
return {
|
||||
data: response.instansi
|
||||
};
|
||||
})
|
||||
.catch(() => { throw new Error('Terdapat kesalahan memuat data'); });
|
||||
}
|
||||
});
|
||||
@ -166,27 +164,12 @@ const bidangOptions = new CustomStore({
|
||||
load:() => {
|
||||
return fetch(URL_bidang+process.env.VUE_APP_PAGE_SIZE)
|
||||
.then((response) => response.json())
|
||||
.then(response => {
|
||||
console.log(response.data);
|
||||
return {
|
||||
data: response.data
|
||||
};
|
||||
})
|
||||
// .then(data => {
|
||||
// console.log(JSON.parse(data));
|
||||
// })
|
||||
.catch(() => { throw new Error('Terdapat kesalahan memuat data'); });
|
||||
},
|
||||
|
||||
byKey: (key) => {
|
||||
return fetch(URL_bidang+'/' + key)
|
||||
.then((response) => response.json())
|
||||
.then(response => {
|
||||
console.log(response.bidang);
|
||||
return {
|
||||
data: response.bidang
|
||||
};
|
||||
})
|
||||
.catch(() => { throw new Error('Terdapat kesalahan memuat data'); });
|
||||
}
|
||||
});
|
||||
@ -197,27 +180,12 @@ const jabatanOptions = new CustomStore({
|
||||
load:() => {
|
||||
return fetch(URL_jabatan+process.env.VUE_APP_PAGE_SIZE)
|
||||
.then((response) => response.json())
|
||||
.then(response => {
|
||||
console.log(response.data);
|
||||
return {
|
||||
data: response.data
|
||||
};
|
||||
})
|
||||
// .then(data => {
|
||||
// console.log(JSON.parse(data));
|
||||
// })
|
||||
.catch(() => { throw new Error('Terdapat kesalahan memuat data'); });
|
||||
},
|
||||
|
||||
byKey: (key) => {
|
||||
return fetch(URL_jabatan+'/' + key)
|
||||
.then((response) => response.json())
|
||||
.then(response => {
|
||||
console.log(response.jabatan);
|
||||
return {
|
||||
data: response.jabatan
|
||||
};
|
||||
})
|
||||
.catch(() => { throw new Error('Terdapat kesalahan memuat data'); });
|
||||
}
|
||||
});
|
||||
@ -228,27 +196,12 @@ const roleOptions = new CustomStore({
|
||||
load:() => {
|
||||
return fetch(URL_role+process.env.VUE_APP_PAGE_SIZE)
|
||||
.then((response) => response.json())
|
||||
.then(response => {
|
||||
console.log(response.data);
|
||||
return {
|
||||
data: response.data
|
||||
};
|
||||
})
|
||||
// .then(data => {
|
||||
// console.log(JSON.parse(data));
|
||||
// })
|
||||
.catch(() => { throw new Error('Terdapat kesalahan memuat data'); });
|
||||
},
|
||||
|
||||
byKey: (key) => {
|
||||
return fetch(URL_role+'/' + key)
|
||||
.then((response) => response.json())
|
||||
.then(response => {
|
||||
console.log(response.role);
|
||||
return {
|
||||
data: response.role
|
||||
};
|
||||
})
|
||||
.catch(() => { throw new Error('Terdapat kesalahan memuat data'); });
|
||||
}
|
||||
});
|
||||
@ -306,7 +259,8 @@ export default {
|
||||
DxToolbar,
|
||||
DxTexts,
|
||||
DxRequiredRule,
|
||||
DxLookup
|
||||
DxLookup,
|
||||
DxEmailRule
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -28,7 +28,9 @@
|
||||
></DxTexts>
|
||||
<DxForm label-location="top" :col-count="1">
|
||||
<!--<DxItem dataField="instansiId" editor-type="dxSelectBox"/>-->
|
||||
<DxItem dataField="instansiId"/>
|
||||
<DxItem dataField="instansiId">
|
||||
<DxRequiredRule message="Silahkan pilih instansi" />
|
||||
</DxItem>
|
||||
<DxItem dataField="bidang">
|
||||
<DxRequiredRule message="Bidang harus diisi" />
|
||||
</DxItem>
|
||||
@ -85,7 +87,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import DxDataGrid, {
|
||||
import {
|
||||
DxDataGrid,
|
||||
DxEditing,
|
||||
DxItem,
|
||||
DxForm,
|
||||
@ -115,14 +118,11 @@ const instansiOptions = new CustomStore({
|
||||
load:() => {
|
||||
return fetch(URL_instansi+process.env.VUE_APP_PAGE_SIZE)
|
||||
.then((response) => response.json())
|
||||
.then(response => {
|
||||
console.log(response.data);
|
||||
return {
|
||||
data: response.data
|
||||
};
|
||||
})
|
||||
// .then(data => {
|
||||
// console.log(JSON.parse(data));
|
||||
// .then(response => {
|
||||
// //console.log(response.data);
|
||||
// return {
|
||||
// data: response.data
|
||||
// };
|
||||
// })
|
||||
.catch(() => { throw new Error('Terdapat kesalahan memuat data'); });
|
||||
},
|
||||
@ -130,12 +130,6 @@ const instansiOptions = new CustomStore({
|
||||
byKey: (key) => {
|
||||
return fetch(URL_instansi+'/' + key)
|
||||
.then((response) => response.json())
|
||||
.then(response => {
|
||||
console.log(response.instansi);
|
||||
return {
|
||||
data: response.instansi
|
||||
};
|
||||
})
|
||||
.catch(() => { throw new Error('Terdapat kesalahan memuat data'); });
|
||||
}
|
||||
});
|
||||
|
@ -121,21 +121,12 @@ const instansiOptions = new CustomStore({
|
||||
data: response.data
|
||||
};
|
||||
})
|
||||
// .then(data => {
|
||||
// console.log(JSON.parse(data));
|
||||
// })
|
||||
.catch(() => { throw new Error('Terdapat kesalahan memuat data'); });
|
||||
},
|
||||
|
||||
byKey: (key) => {
|
||||
return fetch(URL_instansi+'/' + key)
|
||||
.then((response) => response.json())
|
||||
.then(response => {
|
||||
console.log(response.instansi);
|
||||
return {
|
||||
data: response.instansi
|
||||
};
|
||||
})
|
||||
.catch(() => { throw new Error('Terdapat kesalahan memuat data'); });
|
||||
}
|
||||
});
|
||||
@ -152,21 +143,12 @@ const bidangOptions = new CustomStore({
|
||||
data: response.data
|
||||
};
|
||||
})
|
||||
// .then(data => {
|
||||
// console.log(JSON.parse(data));
|
||||
// })
|
||||
.catch(() => { throw new Error('Terdapat kesalahan memuat data'); });
|
||||
},
|
||||
|
||||
byKey: (key) => {
|
||||
return fetch(URL_bidang+'/' + key)
|
||||
.then((response) => response.json())
|
||||
.then(response => {
|
||||
console.log(response.bidang);
|
||||
return {
|
||||
data: response.bidang
|
||||
};
|
||||
})
|
||||
.catch(() => { throw new Error('Terdapat kesalahan memuat data'); });
|
||||
}
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user