Commit 77e9d6ff authored by Riri Novita's avatar Riri Novita

Merge branch 'ENV-STAGING' of http://103.44.149.204/d.arizona/tia-dev into ENV-PROD

parents 2f766a03 6b62ed99
...@@ -492,6 +492,11 @@ const create = (type = "") => { ...@@ -492,6 +492,11 @@ const create = (type = "") => {
const getDetailDocument = (id) => api.get(`document/get_document_by_id/${id}`) const getDetailDocument = (id) => api.get(`document/get_document_by_id/${id}`)
const deleteDocument = (id) => api.post(`document/delete_document/${id}`) const deleteDocument = (id) => api.post(`document/delete_document/${id}`)
const uploadCarfmDocument = (body) => api.post('document/upload_cafrm_document', body) const uploadCarfmDocument = (body) => api.post('document/upload_cafrm_document', body)
const getChcmDocumentBySubmenu = (body) => api.post('document/get_chcm_document_by_submenu', body);
const uploadChcmDocument = (body) => api.post('document/upload_chcm_document', body)
const deleteReportChcm = (id) => api.post(`document/delete_chcm_document/${id}`)
const getDetailReportChcm = (id) => api.get(`document/get_chcm_document_by_id/${id}`)
const updateReportChcm = (body) => api.post('document/update_chcm_document', body)
// Monitoring // Monitoring
...@@ -673,6 +678,11 @@ const create = (type = "") => { ...@@ -673,6 +678,11 @@ const create = (type = "") => {
getAllDocument, getAllDocument,
uploadDocument, uploadDocument,
uploadCarfmDocument, uploadCarfmDocument,
getChcmDocumentBySubmenu,
uploadChcmDocument,
deleteReportChcm,
getDetailReportChcm,
updateReportChcm,
updateDocument, updateDocument,
downloadDocument, downloadDocument,
getPerusahaanUserActive, getPerusahaanUserActive,
......
...@@ -2,6 +2,11 @@ ...@@ -2,6 +2,11 @@
background-color: #273b80 !important; background-color: #273b80 !important;
} }
/* for staging */
/* .main-color{
background-color: #0b6b24 !important;
} */
.sub-color{ .sub-color{
background-color: #f0f1f3 !important; background-color: #f0f1f3 !important;
} }
...@@ -553,7 +553,8 @@ export default class BudgetTahunan extends Component { ...@@ -553,7 +553,8 @@ export default class BudgetTahunan extends Component {
getOptionLabel: (option) => option.periode, getOptionLabel: (option) => option.periode,
}; };
// ubah code dibawah ini jika mau mengubah default periode jadi tahun saat ini // ubah code dibawah ini jika mau mengubah default periode jadi tahun saat ini
let periode = (this.state.lastPeriod == "" ? String(Number(currentYear)) : this.state.lastPeriod) // let periode = (this.state.lastPeriod == "" ? String(Number(currentYear)) : this.state.lastPeriod)
let periode = String(Number(currentYear))
let index = data.sort((a, b) => a - b).findIndex((val) => val === periode) let index = data.sort((a, b) => a - b).findIndex((val) => val === periode)
// // console.log(this.props.location.state.rawData) // // console.log(this.props.location.state.rawData)
// console.log(this.state.lastPeriod) // console.log(this.state.lastPeriod)
...@@ -3832,4 +3833,4 @@ export default class BudgetTahunan extends Component { ...@@ -3832,4 +3833,4 @@ export default class BudgetTahunan extends Component {
</div > </div >
); );
} }
} }
\ No newline at end of file
...@@ -799,6 +799,12 @@ export default class CorporateAnnualTarget extends Component { ...@@ -799,6 +799,12 @@ export default class CorporateAnnualTarget extends Component {
// console.log(i[7]) // console.log(i[7])
let b = [] let b = []
// console.log(i[13].value == undefined? 'Y' : 'N') // console.log(i[13].value == undefined? 'Y' : 'N')
if (String(i[6]) == "Revenue"){
console.log(Number(i[30]))
console.log(String(Number(i[30][2]?.value)/1000))
}
data.push({ data.push({
"item_report_id": i[1] == "" || i[1] == null ? 0 : i[1], "item_report_id": i[1] == "" || i[1] == null ? 0 : i[1],
"item_name": String(i[6]), "item_name": String(i[6]),
...@@ -1644,6 +1650,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -1644,6 +1650,7 @@ export default class CorporateAnnualTarget extends Component {
return (valz == 'SUM' ? total : (valz == 'AVG' ? (total / 12) : lastValz)) return (valz == 'SUM' ? total : (valz == 'AVG' ? (total / 12) : lastValz))
// } // }
} }
// console.log(dataTable2)
const columns = [{ const columns = [{
name: "", name: "",
......
...@@ -149,7 +149,7 @@ export default class CafrmDocument extends Component { ...@@ -149,7 +149,7 @@ export default class CafrmDocument extends Component {
let compActive = [] let compActive = []
let userCompActive = [] let userCompActive = []
this.state.userCompany.map((item, index) => { this.state.userCompany.map((item, index) => {
if (index !== -1 && String(data[index].status).toLocaleLowerCase() == 'active'){ if (index !== -1 && String(data[index]?.status).toLocaleLowerCase() == 'active'){
userCompActive.push(item) userCompActive.push(item)
} }
}) })
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
import React, { Component } from 'react';
import Images from '../../assets/Images';
import { Typography } from '@material-ui/core';
import api from "../../api";
import Constant from '../../library/Constant';
export default class PopUpDelete extends Component {
constructor(props) {
super(props)
this.state = {
id: '',
getApprovedBy: null,
getTypes: null,
}
}
componentDidMount() {
console.log(this.props);
if (this.props.type === 'delete') {
// console.log(this.props.idoc)
// console.log(this.props.data)
}
}
onClickDelete() {
if (this.props.type == 'delete') {
let payload = this.props.idoc
this.props.deleteDoc(payload)
}
}
render() {
return (
<div className="test app-popup-show">
<div className="popup-content background-white border-radius" style={{ borderRadius: 8 }}>
<div style={{ display: 'flex', justifyContent: 'center', paddingTop: 20 }}>
<img src={Images.failed} />
</div>
<div style={{ display: 'grid', justifyContent: 'center', marginTop: 20, paddingBottom: 20 }}>
<span style={{ textAlign: 'center', fontSize: 14, fontWeight: 'bold', fontFamily: 'Nunito Sans, sans-serif' }}>
Delete {this.props.data[1]} ?
</span>
</div>
<div className="border-top grid grid-2x" style={{ height: 56, backgroundColor: '#f5f5f5', paddingLeft: 20, paddingRight: 20 }}>
<div className="column-1" style={{ alignSelf: 'center' }}>
<button
type="button"
onClick={() => this.props.onClickClose()}
>
<div style={{ width: 102, height: 30, border: 'solid 1px #354960', borderRadius: 5, alignItems: 'center', display: 'flex', justifyContent: 'center' }}>
<span style={{ color: '#354960', fontSize: 11 }}>Cancel</span>
</div>
</button>
</div>
<div className="column-2" style={{ display: 'flex', justifyContent: 'flex-end', alignItems: 'center' }}>
<button
type="button"
onClick={() =>
this.setState({ loading: true }, () => {
setTimeout(() => {
this.onClickDelete()
}, 100);
})
}
>
<div style={{ width: 102, height: 30, backgroundColor: '#354960', borderRadius: 5, alignItems: 'center', display: 'flex', justifyContent: 'center' }}>
<span style={{ color: '#fff', fontSize: 11 }}>Delete</span>
</div>
</button>
</div>
</div>
</div>
</div>
);
}
}
This diff is collapsed.
...@@ -822,6 +822,8 @@ export default class CreateParameter extends Component { ...@@ -822,6 +822,8 @@ export default class CreateParameter extends Component {
} }
} else if (this.state.getTypes.setting_group_name == "CURRENCY") { } else if (this.state.getTypes.setting_group_name == "CURRENCY") {
this.setState({ errorValue: true, msgErrorValue: 'Incorrect value format, example : 15000' }) this.setState({ errorValue: true, msgErrorValue: 'Incorrect value format, example : 15000' })
} else if (this.state.getTypes.setting_group_name == "DAY_OFF") {
this.setState({ errorValue: true, msgErrorValue: 'Incorrect value format, example : 2023' })
} }
} }
} }
...@@ -907,6 +909,28 @@ export default class CreateParameter extends Component { ...@@ -907,6 +909,28 @@ export default class CreateParameter extends Component {
} }
} }
} }
} else if (this.state.getTypes.setting_group_name == "DAY_OFF"){
console.log(this.state.errorMaxValue)
if (R.isEmpty(data.value)) {
}else {
if (data.value.match(response.regexValue) && data.value.length <= response.valueLength) {
if (R.isEmpty(data.minValue)) {
} else {
if (data.minValue.match(minMaxValidasi.minMaxRegex) && data.minValue.substring(0, 1) != "0" && data.minValue.length <= minMaxValidasi.minLength) {
if (R.isEmpty(data.maxValue)) {
} else {
if (data.maxValue.match(minMaxValidasi.minMaxRegex) && data.maxValue.substring(0, 1) != "0" && data.maxValue.length <= minMaxValidasi.maxLength) {
if (data.maxValue.slice(-4)==data.value){
this.updateParameter()
}else {
this.setState({ errorValue: true, msgErrorValue: 'Incorrect value format, value must same with a year of max value' })
}
}
}
}
}
}
}
} else { } else {
if (R.isNil(this.state.getParameter)) { if (R.isNil(this.state.getParameter)) {
} else { } else {
...@@ -994,6 +1018,28 @@ export default class CreateParameter extends Component { ...@@ -994,6 +1018,28 @@ export default class CreateParameter extends Component {
} }
} }
} }
} else if (this.state.getTypes.setting_group_name == "DAY_OFF"){
console.log(this.state.errorMaxValue)
if (R.isEmpty(data.value)) {
}else {
if (data.value.match(response.regexValue) && data.value.length <= response.valueLength) {
if (R.isEmpty(data.minValue)) {
} else {
if (data.minValue.match(minMaxValidasi.minMaxRegex) && data.minValue.substring(0, 1) != "0" && data.minValue.length <= minMaxValidasi.minLength) {
if (R.isEmpty(data.maxValue)) {
} else {
if (data.maxValue.match(minMaxValidasi.minMaxRegex) && data.maxValue.substring(0, 1) != "0" && data.maxValue.length <= minMaxValidasi.maxLength) {
if (data.maxValue.slice(-4)==data.value){
this.createParameter()
}else {
this.setState({ errorValue: true, msgErrorValue: 'Incorrect value format, value must same with a year of max value' })
}
}
}
}
}
}
}
} else { } else {
if (R.isNil(this.state.getParameter)) { if (R.isNil(this.state.getParameter)) {
} else { } else {
...@@ -1055,6 +1101,8 @@ export default class CreateParameter extends Component { ...@@ -1055,6 +1101,8 @@ export default class CreateParameter extends Component {
obj = { regexValue: (/Q1\s\d{4}/), valueLength: 7 } obj = { regexValue: (/Q1\s\d{4}/), valueLength: 7 }
} }
} }
}else if (this.state.getTypes.setting_group_name === "DAY_OFF"){
obj = {regexValue: (/\b\d{4}\b/), valueLength: 4}
}else{ }else{
obj = { regexValue: (/null.*$/), valueLength: 20 } obj = { regexValue: (/null.*$/), valueLength: 20 }
} }
...@@ -1084,6 +1132,12 @@ export default class CreateParameter extends Component { ...@@ -1084,6 +1132,12 @@ export default class CreateParameter extends Component {
case "THRESHOLD_VARIANCE": case "THRESHOLD_VARIANCE":
this.setState({ errorMaxValue: true, msgErrorMaxValue: 'Incorrect max value format, example : 99999999' }) this.setState({ errorMaxValue: true, msgErrorMaxValue: 'Incorrect max value format, example : 99999999' })
break break
case "DAY_OFF":
this.setState({
errorMaxValue: true,
msgErrorMaxValue: 'Incorrect max value format, example : 31 Jan 2023'
})
break
default: default:
this.setState({ errorMaxValue: false, msgErrorMaxValue: '' }) this.setState({ errorMaxValue: false, msgErrorMaxValue: '' })
} }
...@@ -1112,6 +1166,9 @@ export default class CreateParameter extends Component { ...@@ -1112,6 +1166,9 @@ export default class CreateParameter extends Component {
case "THRESHOLD_VARIANCE": case "THRESHOLD_VARIANCE":
this.setState({ errorMinValue: true, msgErrorMinValue: 'Incorrect min value format, example : -99999999' }) this.setState({ errorMinValue: true, msgErrorMinValue: 'Incorrect min value format, example : -99999999' })
break break
case "DAY_OFF":
this.setState({ errorMinValue: true, msgErrorMinValue: 'Incorrect min value format, example : 1 Jan 2023' })
break
default: default:
this.setState({ errorMinValue: false, msgErrorMinValue: '' }) this.setState({ errorMinValue: false, msgErrorMinValue: '' })
} }
...@@ -1196,6 +1253,11 @@ export default class CreateParameter extends Component { ...@@ -1196,6 +1253,11 @@ export default class CreateParameter extends Component {
case "THRESHOLD_CONTROL": case "THRESHOLD_CONTROL":
obj = { minMaxRegex: (/^-?\d+(\.\d+)?$/), minLength: this.state.minValue.length, maxLength: this.state.maxValue.length } obj = { minMaxRegex: (/^-?\d+(\.\d+)?$/), minLength: this.state.minValue.length, maxLength: this.state.maxValue.length }
break break
case "DAY_OFF":
obj = {
minMaxRegex: (/\b\d{1,2}\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s\d{4}\b/),
minLength: 11, maxLength: 11
}
default: default:
obj = { regexValue: null, minLength: 11, maxLength: 11 } obj = { regexValue: null, minLength: 11, maxLength: 11 }
} }
......
...@@ -87,7 +87,11 @@ const useStyles = makeStyles((theme) => ({ ...@@ -87,7 +87,11 @@ const useStyles = makeStyles((theme) => ({
}, },
padding: 20, padding: 20,
display: 'flex', display: 'flex',
<<<<<<< HEAD
backgroundColor: '#273b80' backgroundColor: '#273b80'
=======
backgroundColor: '#319c23'
>>>>>>> 6b62ed9909ab356afa97d180033088819e3e7c03
}, },
drawerOpen: { drawerOpen: {
width: drawerWidth, width: drawerWidth,
......
...@@ -318,7 +318,7 @@ export default class CorporateAnnualTargetMR extends Component { ...@@ -318,7 +318,7 @@ export default class CorporateAnnualTargetMR extends Component {
} }
} }
}) })
// console.log(dataTable); console.log(dataTable);
this.setState({ dataTable, loading: false, saveDraft: true }, () => { this.setState({ dataTable, loading: false, saveDraft: true }, () => {
this.handleCalculate(dataTable) this.handleCalculate(dataTable)
}) })
......
...@@ -149,7 +149,7 @@ export default class LOCF extends Component { ...@@ -149,7 +149,7 @@ export default class LOCF extends Component {
if (this.props.dataTablelocf !== prevProps.dataTablelocf) { if (this.props.dataTablelocf !== prevProps.dataTablelocf) {
let array = this.props.dataTablelocf let array = this.props.dataTablelocf
let datas = array[array.length - 1] let datas = array[array.length - 1]
this.setState({ dataTable: this.props.dataTablelocf, diff: datas[47], loanTotal: datas[48], perBS: datas[49] }) this.setState({ dataTable: this.props.dataTablelocf, diff: this.props.defaultCurrency.id == 1 ? fixNumber(Number(datas[47]), 1) : datas[47], loanTotal: datas[48], perBS: this.props.defaultCurrency.id == 1 ? fixNumber(Number(datas[49]), 1) : datas[49] })
} }
if (this.props.loadingChild !== prevProps.loadingChild) { if (this.props.loadingChild !== prevProps.loadingChild) {
this.setState({ loading: this.props.loadingChild }) this.setState({ loading: this.props.loadingChild })
...@@ -353,7 +353,7 @@ export default class LOCF extends Component { ...@@ -353,7 +353,7 @@ export default class LOCF extends Component {
// let sortingTable = dataTable.sort((a, b) => a[6].value - b[6].value) // let sortingTable = dataTable.sort((a, b) => a[6].value - b[6].value)
// console.log(sortingTable); // console.log(sortingTable);
let lastArray = dataTable[res.length - 1] let lastArray = dataTable[res.length - 1]
this.setState({ dataTable, diff: lastArray[47], loanTotal: lastArray[48], perBS: lastArray[49], loading: false, visibleLOCFMR: true }, () => { this.setState({ dataTable, diff: this.props.defaultCurrency.id == 1 ? fixNumber(Number(lastArray[47]), 1) : lastArray[47], loanTotal: lastArray[48], perBS: this.props.defaultCurrency.id == 1 ? fixNumber(Number(lastArray[49]), 1) : lastArray[49], loading: false, visibleLOCFMR: true }, () => {
this.props.sendToParent(dataTable, lastArray, 'LOCF') this.props.sendToParent(dataTable, lastArray, 'LOCF')
}) })
} }
...@@ -565,10 +565,8 @@ export default class LOCF extends Component { ...@@ -565,10 +565,8 @@ export default class LOCF extends Component {
console.log(dataTable); console.log(dataTable);
let lastArray = dataTable[dataTable.length - 1] let lastArray = dataTable[dataTable.length - 1]
console.log(lastArray); this.setState({ dataTable, diff: this.props.defaultCurrency.id == 1 ? fixNumber(Number(lastArray[47]), 1) : lastArray[47], loanTotal: lastArray[48], perBS: this.props.defaultCurrency.id == 1 ? fixNumber(Number(lastArray[49]), 1) : lastArray[49], dataLoaded: true, loading: false, buttonError: false, dataDelete: [] }, () => {
this.setState({ dataTable, diff: lastArray[47], loanTotal: lastArray[48], perBS: lastArray[49], dataLoaded: true, loading: false, buttonError: false, dataDelete: [] }, () => { this.props.sendToParent(dataTable, lastArray, 'LOCF', 'upload', this.state.visibleLOCFMR)
console.log(this.state.visibleLOCFMR);
this.props.sendToParent(dataTable, lastArray , 'LOCF', 'upload', this.state.visibleLOCFMR)
}) })
} else { } else {
this.setState({ alert: true, messageAlert: response.data.message, typeAlert: 'warning', loading: false }, () => { this.setState({ alert: true, messageAlert: response.data.message, typeAlert: 'warning', loading: false }, () => {
...@@ -970,7 +968,7 @@ export default class LOCF extends Component { ...@@ -970,7 +968,7 @@ export default class LOCF extends Component {
} }
const handleValueDropDown = (value, type, tableMeta) => { const handleValueDropDown = (value, type, tableMeta) => {
let data = type == 'bankName' ? this.state.bankNameList.options : type == 'typeOfCreditList' ? this.state.typeOfCreditList.options : this.state.businessBankList.options let data = type == 'bankName' ? this.state.bankNameList.options : type == 'typeOfCreditList' ? this.state.typeOfCreditList.options : this.state.businessBankList.options
let index = 0 let index = 0
if (type == 'bankName' && dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] != null && dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] != "") { if (type == 'bankName' && dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] != null && dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] != "") {
indexNyasar = true indexNyasar = true
...@@ -3619,7 +3617,7 @@ export default class LOCF extends Component { ...@@ -3619,7 +3617,7 @@ export default class LOCF extends Component {
<Typography style={{ fontSize: '12px', color: '#4b4b4b' }}>Diff</Typography> <Typography style={{ fontSize: '12px', color: '#4b4b4b' }}>Diff</Typography>
</div> </div>
<div style={{ borderStyle: 'solid', borderWidth: '0px 1px 1px 1px', padding: 5, minWidth: 200, display: 'flex', justifyContent: 'flex-end' }}> <div style={{ borderStyle: 'solid', borderWidth: '0px 1px 1px 1px', padding: 5, minWidth: 200, display: 'flex', justifyContent: 'flex-end' }}>
<Typography style={{ fontSize: '14px', color: Number(this.state.diff) > 0 ? 'red' : '#4b4b4b' }}><NumberFormat value={this.state.diff} displayType={'text'} thousandSeparator={true} prefix={''} /></Typography> <Typography style={{ fontSize: '14px', color: Number(this.state.diff) > '0.0' || Number(this.state.diff) < '0.0' ? 'red' : '#4b4b4b' }}><NumberFormat value={this.state.diff == 0 ? "0.0" : this.state.diff} displayType={'text'} thousandSeparator={true} prefix={''} /></Typography>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -360,15 +360,15 @@ export default class LOV extends Component { ...@@ -360,15 +360,15 @@ export default class LOV extends Component {
payload.push({ payload.push({
"item_report_id": i[1], "item_report_id": i[1],
"company_name": this.props.company.company_name, "company_name": this.props.company.company_name,
"institution_name": i[3], "institution_name": i[3] !== undefined ? (i[3]) : "",
"type_of_investment": i[4], "type_of_investment": i[4] !== undefined ? (i[4]) : "",
"remarks": i[5], "remarks": i[5] !== undefined ? (i[5]) : "",
"placement_date": i[6] !== undefined ? tgl[2] + '-' + tgl[1] + '-' + tgl[0] : null, "placement_date": i[6] !== undefined ? tgl[2] + '-' + tgl[1] + '-' + tgl[0] : "",
"tenor": i[7], "tenor": i[7] !== undefined ? (i[7]) : "",
"expected_return": i[8], "expected_return": i[8] !== undefined ? (i[8]) : "",
"currency": i[9], "currency": i[9] !== undefined ? (i[9]) : "",
"investment_amount_ori": i[10] !== undefined ? Number(i[10]) : i[10], "investment_amount_ori": i[10] !== undefined ? Number(i[10]) : "",
"investment_amount_cur": i[11] !== undefined ? Number(i[11]) : i[11], "investment_amount_cur": i[11] !== undefined ? Number(i[11]) : "",
"notes": i[12], "notes": i[12],
}) })
} }
......
...@@ -21,6 +21,7 @@ import { ExcelRenderer } from 'react-excel-renderer'; ...@@ -21,6 +21,7 @@ import { ExcelRenderer } from 'react-excel-renderer';
import { fixNumber, roundMath } from "../../library/Utils"; import { fixNumber, roundMath } from "../../library/Utils";
import LOCF from './LOCFMR'; import LOCF from './LOCFMR';
import LOV from './LOVMR'; import LOV from './LOVMR';
import PopUpValidationLOV from '../../library/PopUpValidationLOV';
const Alert = withStyles({ const Alert = withStyles({
})((props) => <MuiAlert elevation={6} variant="filled" {...props} />); })((props) => <MuiAlert elevation={6} variant="filled" {...props} />);
...@@ -142,6 +143,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -142,6 +143,7 @@ export default class ListOfCreditFacilities extends Component {
alert: false, alert: false,
tipeAlert: '', tipeAlert: '',
messageAlert: '', messageAlert: '',
emptyData: false,
} }
} }
...@@ -947,14 +949,19 @@ export default class ListOfCreditFacilities extends Component { ...@@ -947,14 +949,19 @@ export default class ListOfCreditFacilities extends Component {
if (i[0] == 3) { if (i[0] == 3) {
if (i[6] == null || i[7] == null || i[9] == "" || i[10] == "" || i[11] == "" || i[12] == "") { if (i[6] == null || i[7] == null || i[9] == "" || i[10] == "" || i[11] == "" || i[12] == "") {
error = true error = true
this.setState({ emptyData: true})
} }
if ((i[7]?.value == 'Government bonds' && i[8] == '') || (i[7]?.value == 'Stocks' && i[8] == '') || (i[7]?.value == 'Mutual funds' && i[8] == '') || (i[7]?.value == 'Investment in associate' && i[8] == '') || (i[7]?.value == 'Investment in joint venture' && i[8] == '') || (i[7]?.value == 'Investment in subsidiary' && i[8] == '') || (i[7]?.value == 'Corporate bonds' && i[8] == '') || (i[7]?.value == 'Others' && i[8] == '')) { if ((i[7]?.value == 'Government bonds' && i[8] == '') || (i[7]?.value == 'Stocks' && i[8] == '') || (i[7]?.value == 'Mutual funds' && i[8] == '') || (i[7]?.value == 'Investment in associate' && i[8] == '') || (i[7]?.value == 'Investment in joint venture' && i[8] == '') || (i[7]?.value == 'Investment in subsidiary' && i[8] == '') || (i[7]?.value == 'Corporate bonds' && i[8] == '') || (i[7]?.value == 'Others' && i[8] == '')) {
error = true error = true
} else { }else {
error = false if ((i[7].value == 'Government bonds' && i[8] == '') || (i[7].value == 'Stocks' && i[8] == '') || (i[7].value == 'Mutual funds' && i[8] == '') || (i[7].value == 'Investment in associate' && i[8] == '') || (i[7].value == 'Investment in joint venture' && i[8] == '') || (i[7].value == 'Investment in subsidiary' && i[8] == '') || (i[7].value == 'Corporate bonds' && i[8] == '') || (i[7].value == 'Others' && i[8] == '')) {
error = true
this.setState({ emptyData: true})
} else {
error = false
}
} }
// if (i[7].value == 'Government bonds' || i[7].value == 'Stocks' || i[7].value == 'Mutual funds' || i[7].value == 'Investment in associate' || i[7].value == 'Investment in joint venture' || i[7].value == 'Investment in subsidiary' || i[7].value == 'Corporate bonds' || i[7].value == 'Others' && i[8] == '' ) { // if (i[7].value == 'Government bonds' || i[7].value == 'Stocks' || i[7].value == 'Mutual funds' || i[7].value == 'Investment in associate' || i[7].value == 'Investment in joint venture' || i[7].value == 'Investment in subsidiary' || i[7].value == 'Corporate bonds' || i[7].value == 'Others' && i[8] == '' ) {
// error = true // error = true
// } // }
...@@ -1764,7 +1771,11 @@ export default class ListOfCreditFacilities extends Component { ...@@ -1764,7 +1771,11 @@ export default class ListOfCreditFacilities extends Component {
</div> </div>
</Paper>} </Paper>}
</div> </div>
{this.state.emptyData && (
<PopUpValidationLOV
onClickClose={() => this.setState({ emptyData: false })}
/>
)}
{ {
this.state.visibleAlertSave && ( this.state.visibleAlertSave && (
<div className="test app-popup-show"> <div className="test app-popup-show">
......
...@@ -100,6 +100,7 @@ class ReportProgress extends Component { ...@@ -100,6 +100,7 @@ class ReportProgress extends Component {
MB.push({ name: String(i + 1), value: i + 1}) MB.push({ name: String(i + 1), value: i + 1})
} }
} }
console.log(MB);
let defaultPropsMB = { let defaultPropsMB = {
options: MB, options: MB,
...@@ -108,7 +109,8 @@ class ReportProgress extends Component { ...@@ -108,7 +109,8 @@ class ReportProgress extends Component {
this.setState({ this.setState({
listPeriodeMB: defaultPropsMB, listPeriodeMB: defaultPropsMB,
periodeMB: MB[MB.length - 1], // periodeMB: MB[MB.length - 1],
periodeMB: MB[MB.length - 2],
}, () => { }, () => {
this.getReportType() this.getReportType()
// console.log(this.state.listMonth) // console.log(this.state.listMonth)
......
import React, { Component } from 'react';
import Images from '../assets/Images';
import { Typography } from '@material-ui/core';
export default class PopUpValidationLOV extends Component {
render() {
return (
<div className="test app-popup-show">
<div className="popup-content background-white border-radius" style={{ borderRadius: 8, padding: 50 }}>
<div style={{ display: 'flex', justifyContent: 'center' }}>
<img src={Images.failedCopy} />
</div>
<div style={{ display: 'grid', justifyContent: 'center', marginTop: 20 }}>
<span style={{ textAlign: 'center', fontSize: 14, fontWeight: 'bold' }}>
{`There is empty value`}
</span>
<span style={{ textAlign: 'center', fontSize: 14, fontWeight: 'bold' }}>
{`Please fill the blank`}
</span>
</div>
<div style={{ display: 'grid', justifyContent: 'center', marginTop: 24 }}>
<button
className={"btn-save"}
onClick={()=> this.props.onClickClose()}
>
<span style={{ color: 'white' }}>OK</span>
</button>
</div>
</div>
</div>
);
}
}
\ No newline at end of file
...@@ -25,6 +25,7 @@ import CafrmDocument from "../container/CAFRM/CafrmDocument"; ...@@ -25,6 +25,7 @@ import CafrmDocument from "../container/CAFRM/CafrmDocument";
import ReportCafrm from "../container/ReportCarfm/RepotrCafrm"; import ReportCafrm from "../container/ReportCarfm/RepotrCafrm";
import Maintenance from "../container/Auth/Maintenance"; import Maintenance from "../container/Auth/Maintenance";
import DownloadReport from "../container/DownloadReport/DownloadReport" import DownloadReport from "../container/DownloadReport/DownloadReport"
import ChcmDocument from '../container/CHCM/ChcmDocument';
const routes = [ const routes = [
{ {
...@@ -139,6 +140,14 @@ const routes = [ ...@@ -139,6 +140,14 @@ const routes = [
path: "/home/download-report", path: "/home/download-report",
main: DownloadReport main: DownloadReport
}, },
{
path: "/home/report-talent-management-tm",
main: ChcmDocument
},
{
path: "/home/report-trec",
main: ChcmDocument
},
{ {
path: "*", path: "*",
main: screen404 main: screen404
......
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