Update kerangka DRP dan user manajemen
This commit is contained in:
parent
eb3599b351
commit
86a1ab76aa
1
.env
1
.env
@ -1,3 +1,4 @@
|
||||
VUE_APP_ROOT_URL=http://localhost:8080
|
||||
VUE_APP_ROOT_API=http://localhost:9090/api
|
||||
VUE_APP_PUBLIC_KEY="MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAkclHj0FpIPiB+XQL0P/mJVUdYbRXYS9vjSbVllzVteZgVDhK/srybDmAM2PSn8ZlakUa9bkBAGmiozaccDRJx5DJ/C80hIUcQneDKqWuY6rgnT3zKhjt3MHZK0I2VX5t7QgWHdh5Dni/D08JWwTkbnH+qhz8Wb4xlV0HokQB05YB00deuO09fr5Qw3GjgSSK8HA+euoajgijMbRPuReA4nkmBLhyTMryX/1h9vi8Wz9reGeiFdLZLECrcMmbLRF3d8iC/HISqBYdqdyjvGhXzGu19Gog1Qt8/qNh4fPmB0Le3EpfjRkcWrLqi22N7cGRAvagCJJAzqQVKe5S2fTVRwIDAQAB"
|
||||
VUE_APP_DEFAULT_PASS="plngg123"
|
@ -1,2 +1,4 @@
|
||||
VUE_APP_ROOT_URL=https://pln.co.id:8080
|
||||
VUE_APP_ROOT_API=https://pln.co.id/smartproc-service/api
|
||||
VUE_APP_PUBLIC_KEY=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAx3MRA7zxvaWKrtmPl2hRJLFiyryvj0ZUlmWw9OZIgqwJUDBTsg5yFX4hCQrANV1yy5ibTqAn2APdNCdhGgp8R2YLWrUR2vVGbmnKXXzEDsFpT6cgo
|
||||
VUE_APP_PUBLIC_KEY="MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAkclHj0FpIPiB+XQL0P/mJVUdYbRXYS9vjSbVllzVteZgVDhK/srybDmAM2PSn8ZlakUa9bkBAGmiozaccDRJx5DJ/C80hIUcQneDKqWuY6rgnT3zKhjt3MHZK0I2VX5t7QgWHdh5Dni/D08JWwTkbnH+qhz8Wb4xlV0HokQB05YB00deuO09fr5Qw3GjgSSK8HA+euoajgijMbRPuReA4nkmBLhyTMryX/1h9vi8Wz9reGeiFdLZLECrcMmbLRF3d8iC/HISqBYdqdyjvGhXzGu19Gog1Qt8/qNh4fPmB0Le3EpfjRkcWrLqi22N7cGRAvagCJJAzqQVKe5S2fTVRwIDAQAB"
|
||||
VUE_APP_DEFAULT_PASS="plngg123"
|
@ -141,5 +141,5 @@ export default [
|
||||
{
|
||||
text: "Kontrak",
|
||||
icon: "images/icon/ico-7-kontrak.png",
|
||||
},
|
||||
}
|
||||
];
|
||||
|
@ -24,6 +24,9 @@ import RksDaftar from './views/rks-daftar';
|
||||
|
||||
/* DRP */
|
||||
import DrpPenyusunan from './views/drp/drp-penyusunan';
|
||||
import DrpPengadaanDokumen from './views/drp/drp-pengadaan-dokumen';
|
||||
import DrpPengadaan from './views/drp/drp-pengadaan';
|
||||
import DrpDokumen from './views/drp/drp-dokumen';
|
||||
|
||||
/* General */
|
||||
import auth from "./auth";
|
||||
@ -293,8 +296,33 @@ const router = new createRouter({
|
||||
},
|
||||
component: DrpPenyusunan
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
path: "/drp/drp-dokumen",
|
||||
name: "drp-dokumen",
|
||||
meta: {
|
||||
requiresAuth: true,
|
||||
layout: defaultLayout
|
||||
},
|
||||
component: DrpDokumen
|
||||
},
|
||||
{
|
||||
path: "/drp/drp-pengadaan",
|
||||
name: "drp-pengadaan",
|
||||
meta: {
|
||||
requiresAuth: true,
|
||||
layout: defaultLayout
|
||||
},
|
||||
component: DrpPengadaan
|
||||
},
|
||||
{
|
||||
path: "/drp/drp-pengadaan-dokumen",
|
||||
name: "drp-pengadaan-dokumen",
|
||||
meta: {
|
||||
requiresAuth: true,
|
||||
layout: defaultLayout
|
||||
},
|
||||
component: DrpPengadaanDokumen
|
||||
}
|
||||
],
|
||||
history: createWebHashHistory()
|
||||
});
|
||||
|
198
src/views/drp/drp-dokumen.vue
Normal file
198
src/views/drp/drp-dokumen.vue
Normal file
@ -0,0 +1,198 @@
|
||||
<template>
|
||||
<div>
|
||||
<h3 class="content-block main-title">Dokumen Pendukung</h3>
|
||||
<p class="content-block">Dokumen Pendukung</p>
|
||||
<div class="content-block">
|
||||
<div class="dx-card responsive-paddings">
|
||||
<div id="app-container">
|
||||
<DxDataGrid ref="currDataGrid"
|
||||
:data-source="dataSource"
|
||||
key-expr="id"
|
||||
:allow-column-reordering="true"
|
||||
:column-auto-width="true">
|
||||
<DxEditing
|
||||
:allow-adding="true"
|
||||
:allow-updating="true"
|
||||
:allow-deleting="true"
|
||||
:use-icons="true"
|
||||
mode="popup">
|
||||
<DxTexts
|
||||
add-row="Tambah"
|
||||
edit-row="Ubah"
|
||||
delete-row="Hapus"
|
||||
confirm-delete-message="Apakah anda yakin untuk menghapus data ini?"
|
||||
save-row-changes="Simpan"
|
||||
cancel-row-changes="Batal"
|
||||
></DxTexts>
|
||||
<DxForm label-location="top" :col-count="1">
|
||||
<DxItem dataField="tahun">
|
||||
<DxRequiredRule message="Tahun harus diisi" />
|
||||
</DxItem>
|
||||
</DxForm>
|
||||
<DxPopup
|
||||
:hide-on-outside-click="true"
|
||||
:show-title="true"
|
||||
:width="400"
|
||||
:height="400"
|
||||
title="Form Penyusunan DRP">
|
||||
</DxPopup>
|
||||
</DxEditing>
|
||||
<DxToolbar>
|
||||
<DxItem name="groupPanel" />
|
||||
<DxItem name="searchPanel" location="before"/>
|
||||
<DxItem name="addRowButton" show-text="always" css-class="">
|
||||
<DxTexts add-row="Tambah"></DxTexts>
|
||||
</DxItem>
|
||||
<DxItem name="exportButton" />
|
||||
<DxItem name="columnChooserButton" />
|
||||
</DxToolbar>
|
||||
<DxPaging :page-size="5" />
|
||||
<DxPager
|
||||
:visible="true"
|
||||
:allowed-page-sizes="[5, 10, 50]"
|
||||
:display-mode="compact"
|
||||
:show-page-size-selector="true"
|
||||
:show-info="true"
|
||||
:show-navigation-buttons="true"
|
||||
info-text="Hal {0} dari {1} ({2} data)" />
|
||||
<DxFilterRow :visible="false" />
|
||||
<DxColumn cell-template="row-cell-template" caption="No" :width="45"></DxColumn>
|
||||
<DxColumn data-field="jenisdokumenId" caption="Jenis Dokumen"></DxColumn>
|
||||
<DxColumn data-field="nama_file" caption="Nama File"></DxColumn>
|
||||
<DxColumn data-field="keterangan" caption="Keterangan"></DxColumn>
|
||||
<DxColumn type="buttons" caption="Aksi">
|
||||
<DxButton name="edit"/>
|
||||
<DxButton name="delete"/>
|
||||
</DxColumn>
|
||||
<template #row-cell-template="{ data }">
|
||||
<DxText>{{ data.rowIndex +1 }}</DxText>
|
||||
</template>
|
||||
<DxSearchPanel :visible="true" :highlight-case-sensitive="true" :width="300" placeholder="Cari Penyusunan DRP..."/>
|
||||
</DxDataGrid>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import DxDataGrid, {
|
||||
DxEditing,
|
||||
DxItem,
|
||||
DxForm,
|
||||
DxPopup,
|
||||
DxColumn,
|
||||
DxFilterRow,
|
||||
DxPager,
|
||||
DxPaging,
|
||||
DxSearchPanel,
|
||||
DxToolbar,
|
||||
DxTexts,
|
||||
DxButton,
|
||||
DxRequiredRule
|
||||
} from "devextreme-vue/data-grid";
|
||||
import CustomStore from "devextreme/data/custom_store";
|
||||
|
||||
const approveStatus = [
|
||||
{ name: "Penyusunan", value: 0 },
|
||||
{ name: "Approval VP", value: 1 },
|
||||
{ name: "Rekomendasi Komite", value: 2 },
|
||||
{ name: "Approval DIRUT", value: 3 },
|
||||
{ name: "Approved", value: 4 },
|
||||
{ name: "Revisi DRP", value: 1 }
|
||||
];
|
||||
|
||||
const URL = process.env.VUE_APP_ROOT_API+'/drp';
|
||||
|
||||
const dataSource = new CustomStore({
|
||||
key: 'id',
|
||||
|
||||
load: () => {
|
||||
return fetch(URL+'?size=100')
|
||||
.then(response => response.json())
|
||||
.then(response => {
|
||||
return {
|
||||
data: response.data,
|
||||
totalCount: response.pagination.totalRecords
|
||||
};
|
||||
})
|
||||
.catch(() => { throw new Error('Terdapat kesalahan memuat data'); });
|
||||
},
|
||||
|
||||
insert: (values) => {
|
||||
return fetch(URL, {
|
||||
method: "POST",
|
||||
body: JSON.stringify(values),
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
update: (key, values) => {
|
||||
return fetch(URL + "/" + encodeURIComponent(key), {
|
||||
method: "PUT",
|
||||
body: JSON.stringify(values),
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
remove: (key) => {
|
||||
return fetch(URL + "/" + encodeURIComponent(key), {
|
||||
method: "DELETE",
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
export default {
|
||||
setup() {
|
||||
return {
|
||||
approveStatus
|
||||
};
|
||||
},
|
||||
components: {
|
||||
DxDataGrid,
|
||||
DxEditing,
|
||||
DxItem,
|
||||
DxForm,
|
||||
DxPopup,
|
||||
DxColumn,
|
||||
DxFilterRow,
|
||||
DxPager,
|
||||
DxPaging,
|
||||
DxSearchPanel,
|
||||
DxToolbar,
|
||||
DxTexts,
|
||||
DxButton,
|
||||
DxRequiredRule
|
||||
},
|
||||
methods: {
|
||||
linkDokumen : function() {
|
||||
location.href='#/drp/drp-dokumen';
|
||||
},
|
||||
linkDetail : function() {
|
||||
location.href='#/drp/drp-dokumen';
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
//jsonUrl: URL,
|
||||
dataSource,
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.dx-link.dx-icon-attach.dx-link-icon {
|
||||
color: #DBD203;
|
||||
}
|
||||
.dx-link.dx-icon-search.dx-link-icon {
|
||||
color: #FF9A62;
|
||||
}
|
||||
.dx-link.dx-icon-movetofolder.dx-link-icon {
|
||||
color: #0996C2;
|
||||
}
|
||||
</style>
|
13
src/views/drp/drp-pengadaan-dokumen.vue
Normal file
13
src/views/drp/drp-pengadaan-dokumen.vue
Normal file
@ -0,0 +1,13 @@
|
||||
<template>
|
||||
<div>
|
||||
<h2 class="content-block">Drp Pengadaan Dokumen</h2>
|
||||
<div class="content-block">
|
||||
<div class="dx-card responsive-paddings">
|
||||
Put your content here
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style lang="scss">
|
||||
</style>
|
13
src/views/drp/drp-pengadaan.vue
Normal file
13
src/views/drp/drp-pengadaan.vue
Normal file
@ -0,0 +1,13 @@
|
||||
<template>
|
||||
<div>
|
||||
<h2 class="content-block">Drp Pengadaan</h2>
|
||||
<div class="content-block">
|
||||
<div class="dx-card responsive-paddings">
|
||||
Put your content here
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style lang="scss">
|
||||
</style>
|
@ -12,8 +12,6 @@
|
||||
:column-auto-width="true">
|
||||
<DxEditing
|
||||
:allow-adding="true"
|
||||
:allow-updating="true"
|
||||
:allow-deleting="true"
|
||||
:use-icons="true"
|
||||
mode="popup">
|
||||
<DxTexts
|
||||
@ -55,18 +53,34 @@
|
||||
:show-info="true"
|
||||
:show-navigation-buttons="true"
|
||||
info-text="Hal {0} dari {1} ({2} data)" />
|
||||
<DxFilterRow :visible="false" />
|
||||
<DxFilterRow :visible="true" />
|
||||
<DxColumn cell-template="row-cell-template" caption="No" :width="45"></DxColumn>
|
||||
<DxColumn data-field="tahun" caption="Tahun DRP"></DxColumn>
|
||||
<DxColumn data-field="isApprove" caption="Status Approve" editor-type="dxCheckBox"></DxColumn>
|
||||
<DxColumn data-field="approveDate" caption="Tanggal Approve"></DxColumn>
|
||||
<DxColumn data-field="isApprove" caption="Status Approve" editor-type="dxCheckBox">
|
||||
<dx-lookup
|
||||
display-expr="name"
|
||||
value-expr="value"
|
||||
:data-source="approveStatus"
|
||||
/>
|
||||
</DxColumn>
|
||||
<DxColumn data-field="approveDate" caption="Tanggal Approve" data-type="date"></DxColumn>
|
||||
<DxColumn type="buttons" caption="Aksi">
|
||||
<DxButton name="edit"/>
|
||||
<DxButton name="delete"/>
|
||||
<DxButton
|
||||
text="Detail"
|
||||
icon="increaseindent"
|
||||
hint="Detail"
|
||||
text="Dokumen"
|
||||
icon="attach"
|
||||
hint="Dokumen Pendukung DRP"
|
||||
:on-click="linkDokumen"
|
||||
/>
|
||||
<DxButton
|
||||
text="Detil"
|
||||
icon="search"
|
||||
hint="Detil/Konten DRP "
|
||||
:on-click="linkDetil"
|
||||
/>
|
||||
<DxButton
|
||||
text="Kirim"
|
||||
icon="movetofolder"
|
||||
hint="Kirim DRP"
|
||||
:on-click="linkDetail"
|
||||
/>
|
||||
</DxColumn>
|
||||
@ -97,10 +111,20 @@ import DxDataGrid, {
|
||||
DxSearchPanel,
|
||||
DxToolbar,
|
||||
DxTexts,
|
||||
DxButton
|
||||
DxButton,
|
||||
DxRequiredRule
|
||||
} from "devextreme-vue/data-grid";
|
||||
import CustomStore from "devextreme/data/custom_store";
|
||||
|
||||
const approveStatus = [
|
||||
{ name: "Penyusunan", value: 0 },
|
||||
{ name: "Approval VP", value: 1 },
|
||||
{ name: "Rekomendasi Komite", value: 2 },
|
||||
{ name: "Approval DIRUT", value: 3 },
|
||||
{ name: "Approved", value: 4 },
|
||||
{ name: "Revisi DRP", value: 1 }
|
||||
];
|
||||
|
||||
const URL = process.env.VUE_APP_ROOT_API+'/drp';
|
||||
|
||||
const dataSource = new CustomStore({
|
||||
@ -146,6 +170,11 @@ const dataSource = new CustomStore({
|
||||
});
|
||||
|
||||
export default {
|
||||
setup() {
|
||||
return {
|
||||
approveStatus
|
||||
};
|
||||
},
|
||||
components: {
|
||||
DxDataGrid,
|
||||
DxEditing,
|
||||
@ -159,11 +188,15 @@ export default {
|
||||
DxSearchPanel,
|
||||
DxToolbar,
|
||||
DxTexts,
|
||||
DxButton
|
||||
DxButton,
|
||||
DxRequiredRule
|
||||
},
|
||||
methods: {
|
||||
linkDokumen : function() {
|
||||
location.href='#/drp/drp-dokumen';
|
||||
},
|
||||
linkDetail : function() {
|
||||
location.href='master-data/strategi-pengadaan';
|
||||
location.href='#/drp/drp-dokumen';
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@ -176,4 +209,13 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.dx-link.dx-icon-attach.dx-link-icon {
|
||||
color: #DBD203;
|
||||
}
|
||||
.dx-link.dx-icon-search.dx-link-icon {
|
||||
color: #FF9A62;
|
||||
}
|
||||
.dx-link.dx-icon-movetofolder.dx-link-icon {
|
||||
color: #0996C2;
|
||||
}
|
||||
</style>
|
||||
|
@ -26,29 +26,31 @@
|
||||
save-row-changes="Simpan"
|
||||
cancel-row-changes="Batal"
|
||||
></DxTexts>
|
||||
<DxForm label-location="top" :col-count="1">
|
||||
<DxItem dataField="username" />
|
||||
<DxItem dataField="email" />
|
||||
<DxItem dataField="password"/>
|
||||
<DxItem dataField="nama" />
|
||||
<DxItem dataField="instansiId">
|
||||
<DxForm label-location="top">
|
||||
<DxItem dataField="nama" :col-span="2" :editor-options="{ placeholder: 'Masukkan Nama' }">
|
||||
<DxRequiredRule message="Nama harus diisi" />
|
||||
</DxItem>
|
||||
<DxItem dataField="instansiId" :editor-options="{ placeholder: 'Pilih Instansi' }">
|
||||
<DxRequiredRule message="Instansi harus dipilih" />
|
||||
</DxItem>
|
||||
<DxItem dataField="bidangId">
|
||||
<DxItem dataField="bidangId" :editor-options="{ placeholder: 'Pilih Bidang' }">
|
||||
<DxRequiredRule message="Bidang harus dipilih" />
|
||||
</DxItem>
|
||||
<DxItem dataField="jabatanId">
|
||||
<DxItem dataField="jabatanId" :col-span="2" :editor-options="{ placeholder: 'Pilih Jabatan' }">
|
||||
<DxRequiredRule message="Nama Jabatan harus dipilih" />
|
||||
</DxItem>
|
||||
<DxItem dataField="roleId">
|
||||
<DxItem dataField="roleId" :col-span="2" :editor-options="{ placeholder: 'Pilih Role' }">
|
||||
<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>
|
||||
</DxForm>
|
||||
<DxPopup
|
||||
:hide-on-outside-click="true"
|
||||
:show-title="true"
|
||||
:width="600"
|
||||
:height="700"
|
||||
:height="550"
|
||||
title="Form Manajemen User"
|
||||
/>
|
||||
</DxEditing>
|
||||
@ -70,27 +72,31 @@
|
||||
:show-info="true"
|
||||
:show-navigation-buttons="true"
|
||||
info-text="Hal {0} dari {1} ({2} data)" />
|
||||
<DxFilterRow :visible="false" />
|
||||
<DxColumn data-field="id" caption="No" :width="45"></DxColumn>
|
||||
<DxColumn data-field="nama" caption="Nama"></DxColumn>
|
||||
<DxColumn data-field="username" caption="Username"></DxColumn>
|
||||
<DxColumn data-field="roleId" caption="Role">
|
||||
<DxLookup display-expr="role" value-expr="id" :data-source="roles" :search-enabled="true" />
|
||||
</DxColumn>
|
||||
<DxColumn data-field="email" caption="Email"></DxColumn>
|
||||
<DxFilterRow :visible="true" />
|
||||
<DxColumn cell-template="row-cell-template" caption="No" :width="45"></DxColumn>
|
||||
<DxColumn data-field="instansiId" caption="Instansi">
|
||||
<DxLookup display-expr="instansi" value-expr="id" :data-source="instansis" :search-enabled="true" />
|
||||
</DxColumn>
|
||||
<DxColumn data-field="bidangId" caption="Bidang">
|
||||
<DxLookup display-expr="bidang" value-expr="id" :data-source="bidangs" :search-enabled="true" />
|
||||
</DxColumn>
|
||||
<DxColumn data-field="nama" caption="Nama"></DxColumn>
|
||||
<DxColumn data-field="jabatanId" caption="Jabatan">
|
||||
<DxLookup display-expr="jabatan" value-expr="id" :data-source="jabatans" :search-enabled="true" />
|
||||
</DxColumn>
|
||||
<DxColumn data-field="roleId" caption="Role">
|
||||
<DxLookup display-expr="role" value-expr="id" :data-source="roles" :search-enabled="true" />
|
||||
</DxColumn>
|
||||
<DxColumn data-field="email" caption="Email"></DxColumn>
|
||||
<DxColumn data-field="noTelepon" caption="No. Telepon"></DxColumn>
|
||||
<DxColumn data-field="isActive" caption="Status"></DxColumn>
|
||||
<DxColumn type="buttons" caption="Aksi">
|
||||
<DxButton name="edit"/>
|
||||
<DxButton name="delete"/>
|
||||
</DxColumn>
|
||||
<template #row-cell-template="{ data }">
|
||||
<DxText>{{ data.rowIndex + data.component.pageIndex() + 1 }}</DxText>
|
||||
</template>
|
||||
<DxSearchPanel :visible="true" :highlight-case-sensitive="true" :width="300" placeholder="Cari Manajemen User..."/>
|
||||
</DxDataGrid>
|
||||
</div>
|
||||
@ -257,6 +263,8 @@ const dataSource = new CustomStore({
|
||||
},
|
||||
|
||||
insert: (values) => {
|
||||
values.password = process.env.VUE_APP_DEFAULT_PASS;
|
||||
//console.log(values);
|
||||
return fetch(URL, {
|
||||
method: "POST",
|
||||
body: JSON.stringify(values),
|
||||
|
Loading…
x
Reference in New Issue
Block a user