Update DRP Pengadaan dan bug select box, authentication with menus

This commit is contained in:
Titan Hadiyan
2023-06-01 20:09:46 +07:00
parent 7ae5db711e
commit 3f0aafc0e9
7 changed files with 1339 additions and 1115 deletions

View File

@@ -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'); });
}
});

View File

@@ -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'); });
}
});