Commit ef8b66fb authored by Deni Rinaldi's avatar Deni Rinaldi

Merge branch 'deni-dev(pc)' into 'master'

Deni dev(pc)

See merge request !95
parents 8cd494ed 20709072
......@@ -69,6 +69,7 @@ const create = (baseURL = 'https://tia.eksad.com/tia-reporting-dev/public/') =>
//Role
const getRole = () => api.get('role/get_all_role')
const getRoleActive = () => api.get('role/get_all_role_active')
const getDetailRole = (roleId) => api.get(`role/get_role_by_id/${roleId}`)
const searchRole = (body) => api.post('/role/search_role', body)
const addRole = (body) => api.post('role/create_role', body)
......@@ -88,6 +89,7 @@ const create = (baseURL = 'https://tia.eksad.com/tia-reporting-dev/public/') =>
// Perusahaan
const getPerusahaan = () => api.get('company/get_all_company')
const getPerusahaanActive = () => api.get('company/get_all_company_active')
const createPerusahaan = (body) => api.post('/company/create_company', body)
const updatePerusahaan = (body) => api.post('/company/update_company', body)
const getPerusahaanHierarki = () => api.get('company/get_company_hierarki')
......@@ -112,6 +114,13 @@ const create = (baseURL = 'https://tia.eksad.com/tia-reporting-dev/public/') =>
const checkUploadUser = (body) => api.post('/user/check_import', body)
const uploadUser = (body) => api.post('/user/import_user', body)
//PARAMETER
const getAllParameter = () => api.get('/setting/get_all_setting')
const getDetailParameter = (id) => api.get(`setting/get_setting_by_id/${id}`)
const getAllGroup = () => api.get('/setting_group/get_all_setting_group')
const getParameterByGroup = (groupID) => api.get(`/setting_type/get_all_setting_type_by_group/${groupID}`)
const createParameter = (body) => api.post('setting/create_setting', body)
const updateParameter = (body) => api.post('setting/update_setting', body)
//Template
const downloadTemplate = (fileName,fileType) => api.get(`attachment/download_file?fileName=${fileName}&&fileType=${fileType}`)
......@@ -167,7 +176,15 @@ const create = (baseURL = 'https://tia.eksad.com/tia-reporting-dev/public/') =>
changePassword,
getPerusahaanHierarki,
checkUploadUser,
uploadUser
uploadUser,
getAllParameter,
getAllGroup,
getParameterByGroup,
getDetailParameter,
updateParameter,
createParameter,
getPerusahaanActive,
getRoleActive
}
}
......
......@@ -161,6 +161,47 @@
.btn-no-outline{
outline: 'none'
}
.form {
display: flex;
}
.form>div {
display: inline-block;
vertical-align: top;
}
#treeviewDriveC,
#treeviewDriveD {
margin-top: 10px;
}
.drive-header {
min-height: auto;
padding: 0px;
cursor: default;
}
.drive-header .dx-icon {
margin-top: -4px;
}
.drive-panel {
padding: 20px 30px;
font-size: 115%;
font-weight: bold;
border-right: 1px solid rgba(165, 165, 165, 0.4);
height: 100%;
}
.drive-panel:last-of-type {
border-right: none;
}
.dx-treeview-item {
position: relative;
left: -2px;
}
.color-white {
......@@ -78,10 +78,10 @@ export default class DashboardCAT extends Component {
<Tab label="KPIs" style={{ color: '#fff', fontSize: 11 }} />
</Tabs>
</AppBar>
{this.state.tab == 0 ?
{this.state.tab === 0 ?
<ExceutiveScoreboard height={this.props.height} />
:
this.state.tab == 1 ?
this.state.tab === 1 ?
<span>Testt</span>
:
<span>Test2</span>
......
......@@ -50,12 +50,14 @@ export default class UnitBisnis extends Component {
let isi = resp.rows.slice(3)
let payload = []
isi.map((item, index) => {
payload.push({
id: index + 1,
business_unit_name: item[0],
start_date: item[1],
end_date: item[2],
})
if (item.length > 0) {
payload.push({
id: index + 1,
business_unit_name: item[0],
start_date: item[1],
end_date: item[2],
})
}
})
let body = {
business_unit: payload
......@@ -170,8 +172,6 @@ export default class UnitBisnis extends Component {
})
// console.log(JSON.stringify(payload));
}
});
}
......@@ -185,7 +185,7 @@ export default class UnitBisnis extends Component {
console.log(response)
if (response.data.status == 'success') {
let data = response.data.data
let listData = data.map((item, index) => {
let listData = data.sort((a,b) => a.business_unit_id - b.business_unit_id).map((item, index) => {
return [index, item.business_unit_id, item.business_unit_name, item.status]
})
this.setState({ dataTable: listData, listData: response.data.data })
......@@ -287,7 +287,7 @@ export default class UnitBisnis extends Component {
this.setState({ visibleUnitBisnis: true })
})
}
render() {
const columns = [{
name: "Action",
......
......@@ -78,7 +78,7 @@ export default class CreateUnitBisnis extends Component {
return (
<div className="test app-popup-show">
<div className="popup-content background-white border-radius" style={{ borderRadius: 8 }}>
<div className="popup-panel grid grid-2x" style={{ backgroundColor: '#51c6ea', height: 64, borderTopRightRadius: 8, borderTopLeftRadius: 8 }}>
<div className="popup-panel grid grid-2x main-color" style={{ height: 64, borderTopRightRadius: 8, borderTopLeftRadius: 8 }}>
<div className="col-1" style={{ maxWidth: "inherit", display: 'flex', alignItems: 'center' }}>
<div className="popup-title">
<span style={{ color: '#fff', fontSize: 16, fontWeight: 'bold' }}>Edit Data</span>
......
......@@ -119,7 +119,7 @@ export default class AddUser extends Component {
}
getRole() {
api.create().getRole().then((response) => {
api.create().getRoleActive().then((response) => {
if(response.data.status === 'success') {
let data = response.data.data
let roleData = data.map((item) => {
......
......@@ -154,7 +154,7 @@ export default class EditUser extends Component {
}
getRole() {
api.create().getRole().then((response) => {
api.create().getRoleActive().then((response) => {
if(response.data.status === 'success') {
let data = response.data.data
let roleData = data.map((item) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment