Commit 5f57998a authored by Hardiansyah's avatar Hardiansyah

pemisahan report finance & CAT

parent 28a98f05
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -54,7 +54,6 @@ export default class OutlookPA extends Component { ...@@ -54,7 +54,6 @@ export default class OutlookPA extends Component {
visiblePL: false, visiblePL: false,
visibleCF: false, visibleCF: false,
visibleCAT: false, visibleCAT: false,
listAttachment: [],
visibleUpload: false, visibleUpload: false,
revisionTable: null, revisionTable: null,
alert: false, alert: false,
...@@ -90,7 +89,6 @@ export default class OutlookPA extends Component { ...@@ -90,7 +89,6 @@ export default class OutlookPA extends Component {
arrayReport: [], arrayReport: [],
popupDownload: false, popupDownload: false,
defaultCurrency: null, defaultCurrency: null,
dataCurrency: [],
currency: [], currency: [],
visibleAlertSave: false, visibleAlertSave: false,
dataCurrency: [ dataCurrency: [
...@@ -102,7 +100,27 @@ export default class OutlookPA extends Component { ...@@ -102,7 +100,27 @@ export default class OutlookPA extends Component {
"id": 2, "id": 2,
"value": "USD", "value": "USD",
} }
] ],
dataTableCAT: [],
dataTableRevisionCAT: [],
dataForRevisionCAT: [],
rowDataFinance: [],
rowDataCAT: [],
submitterCAT: null,
approverIDCAT: null,
picCAT: null,
btnApproveCAT: false,
lastStatusCat: null,
rowData: [],
dataTableHistoryCAT: [],
visibleTableHistoryCAT: false,
isApproverFinance: false,
isApproverCAT: false,
currentMasterReportTypeId: null,
listReportTypeId: [],
listAttachmentCAT: [],
listAttachment: [],
} }
this.myRef = React.createRef() this.myRef = React.createRef()
this.fileHandler = this.fileHandler.bind(this); this.fileHandler = this.fileHandler.bind(this);
...@@ -139,10 +157,10 @@ export default class OutlookPA extends Component { ...@@ -139,10 +157,10 @@ export default class OutlookPA extends Component {
api.create().checkApproverOLPA().then(response => { api.create().checkApproverOLPA().then(response => {
if (response.data.status === 'success') { if (response.data.status === 'success') {
if (response.data.data.is_approver === true) { if (response.data.data.is_approver === true) {
this.setState({ isApprover: true, checkApprover: true, listStatus: listStatus1, selectedStatus: listStatus1 }, () => this.setState({ isApprover: true, checkApprover: true, isApproverFinance: response.data.data.is_finance, isApproverCAT: response.data.data.is_cat, listStatus: listStatus1, selectedStatus: listStatus1 }, () =>
this.getPeriode()) this.getPeriode())
} else { } else {
this.setState({ isApprover: false, checkApprover: false, listStatus: listStatus2, selectedStatus: listStatus2 }, () => this.setState({ isApprover: false, checkApprover: false, isApproverFinance: false, isApproverCAT: false, listStatus: listStatus2, selectedStatus: listStatus2 }, () =>
this.getPeriode()) this.getPeriode())
} }
} else { } else {
...@@ -261,12 +279,12 @@ export default class OutlookPA extends Component { ...@@ -261,12 +279,12 @@ export default class OutlookPA extends Component {
this.getRevision() this.getRevision()
this.getCurrency(this.state.company.company_id) this.getCurrency(this.state.company.company_id)
} else { } else {
this.setState({ listRevision: null, revision: null, dataTable: [], checkApprover: false, lastRevision: "", visibleTableHistory: false, loading: false }) this.setState({ listRevision: null, revision: null, dataTable: [], dataTableCAT: [], checkApprover: false, lastRevision: "", visibleTableHistory: false, visibleTableHistoryCAT: false, loading: false })
} }
// //
}) })
} else { } else {
this.setState({ listRevision: null, revision: null, listCompany: null, company: null, dataTable: [], lastRevision: "", visibleTableHistory: false, loading: false }, () => { this.setState({ listRevision: null, revision: null, listCompany: null, company: null, dataTable: [], dataTableCAT: [], lastRevision: "", visibleTableHistory: false, visibleTableHistoryCAT: false, loading: false }, () => {
document.body.style.overflow = 'unset'; document.body.style.overflow = 'unset';
}) })
} }
...@@ -287,28 +305,31 @@ export default class OutlookPA extends Component { ...@@ -287,28 +305,31 @@ export default class OutlookPA extends Component {
} }
getReportAttachment() { getReportAttachment() {
let payload = { this.state.listReportTypeId.forEach((master_report_type_id) => {
"company_id": this.state.company.company_id, let payload = {
"periode": this.state.periode.periode, "company_id": this.state.company.company_id,
"revision": this.state.revision.revision, "periode": this.state.periode.periode,
} "revision": this.state.revision.revision,
api.create().getOLPAAtt(payload).then(response => { master_report_type_id
// console.log(response)
if (response.data) {
if (response.data.status === "success") {
this.setState({ listAttachment: response.data.data })
}
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false }, () => {
if (response.data.message.includes("Someone Logged In") || response.data.message.includes("Token Expired")) {
setTimeout(() => {
localStorage.removeItem(Constant.TOKEN)
window.location.reload();
}, 1000);
}
})
} }
// console.log(response); api.create().getOLPAAtt(payload).then(response => {
// console.log(response)
if (response.data) {
if (response.data.status === "success") {
this.setState({ listAttachment: response.data.data })
}
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false }, () => {
if (response.data.message.includes("Someone Logged In") || response.data.message.includes("Token Expired")) {
setTimeout(() => {
localStorage.removeItem(Constant.TOKEN)
window.location.reload();
}, 1000);
}
})
}
// console.log(response);
})
}) })
} }
...@@ -323,7 +344,8 @@ export default class OutlookPA extends Component { ...@@ -323,7 +344,8 @@ export default class OutlookPA extends Component {
console.log(response); console.log(response);
if (response.data) { if (response.data) {
if (response.data.status === "success") { if (response.data.status === "success") {
let dataTable = response.data.data.map((item, index) => { const listData = response?.data?.data || []
let dataTable = listData.map((item, index) => {
return [ return [
item.number, item.number,
item.report_name, item.report_name,
...@@ -338,19 +360,56 @@ export default class OutlookPA extends Component { ...@@ -338,19 +360,56 @@ export default class OutlookPA extends Component {
// dataTable.push([ // dataTable.push([
// 5, "Corporate Annual Target", 0, "not-yet", 39, false, 0 // 5, "Corporate Annual Target", 0, "not-yet", 39, false, 0
// ]) // ])
let dataTableRevision = [] const transformRevision = (rows = []) =>
response.data.data.map((item, index) => { rows
if (item.report_name !== 'Cash Flow') { .filter(item => item.report_name !== 'Cash Flow')
dataTableRevision.push([ .map(item => [
item.report_id, item.report_id,
item.report_name === 'CAT' ? 'Corporate Annual Target' : item.report_name, item.report_name === 'CAT'
"", ? 'Corporate Annual Target'
item.number : item.report_name,
'',
item.number,
]) ])
} const [rawCAT, resultDataTableFinance] = (dataTable ?? []).reduce(
}) (acc, item) => {
acc[item[1] === 'Corporate Annual Target' ? 0 : 1].push(item)
return acc
},
[[], []]
)
const [rowDataTableCAT, rowDataTableFinance] = (response?.data?.data ?? []).reduce(
(acc, item) => {
acc[item.report_name === 'CAT' ? 0 : 1].push(item)
return acc
},
[[], []]
)
const resultDataTableCAT = rawCAT.map((item, i) => [
i + 1,
...item.slice(1),
])
const rowDataFinance = listData.filter(
item => item.master_report_type_id === 1
);
const rowDataCAT = listData.filter(
item => item.master_report_type_id === 2
);
const dataTableRevisionCAT = transformRevision(rowDataTableCAT)
const dataTableRevision = transformRevision(rowDataTableFinance)
// console.log(dataTable); // console.log(dataTable);
this.setState({ dataTable, loading: false, dataTableRevision: dataTableRevision.sort((a, b) => a.number - b.number), dataForRevision: response.data.data }) this.setState({
loading: false, dataTable: resultDataTableFinance, dataTableCAT: resultDataTableCAT,
rowDataFinance,
rowDataCAT,
rowData: listData,
dataTableRevision: dataTableRevision,
dataForRevision: rowDataTableFinance,
dataTableRevisionCAT: dataTableRevisionCAT,
dataForRevisionCAT: rowDataTableCAT,
})
} else { } else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false }, () => { this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false }, () => {
if (response.data.message.includes("Someone Logged In") || response.data.message.includes("Token Expired")) { if (response.data.message.includes("Someone Logged In") || response.data.message.includes("Token Expired")) {
...@@ -579,23 +638,33 @@ export default class OutlookPA extends Component { ...@@ -579,23 +638,33 @@ export default class OutlookPA extends Component {
} }
getOutlookPAID(type) { getOutlookPAID(type) {
const _lastStatus = this.getLastStatus()
this.setState({ loading: true }) this.setState({ loading: true })
let payload = { let payload = {
"company_id": this.state.company.company_id, "company_id": this.state.company.company_id,
"periode": this.state.periode.periode, "periode": this.state.periode.periode,
"is_approver": this.state.isAdmin && this.state.lastStatus == 'WAITING FOR APPROVAL' ? false : this.state.isApprover "is_approver": this.state.isAdmin && _lastStatus === 'WAITING FOR APPROVAL' ? false : this.state.isApprover
} }
api.create().getOutlookPAID(payload).then(response => { api.create().getOutlookPAID(payload).then(response => {
console.log(response) console.log(response)
if (response) { if (response) {
if (response.data.status === "success") { if (response.data.status === "success") {
const uniqueTypeIds =
this.state.rowData?.length
? [...new Set(this.state.rowData.map(item => item.master_report_type_id))]
: [1, 2];
this.setState({ this.setState({
outlook_pa_id: response.data.data.outlook_pa_id, outlook_pa_id: response.data.data.outlook_pa_id,
submitter: response.data.data.submitter, submitter: response.data.data.submitter_finance,
approverID: response.data.data.approve_id, pic: response.data.data.approver == null ? '' : response.data.data.approver, submitterCAT: response.data.data.submitter_cat,
lastStatus: response.data.data.last_status === null ? 'SUBMIT' : response.data.data.last_status, approverID: response.data.data.finance_approve_id,
approverIDCAT: response.data.data.cat_approve_id,
lastStatus: response.data.data.last_status_finance === null ? 'SUBMIT' : response.data.data.last_status_finance,
lastStatusCat: response.data.data.last_status_cat === null ? 'SUBMIT' : response.data.data.last_status_cat,
lastRevision: response.data.data.last_revision, lastRevision: response.data.data.last_revision,
btnApprove: response.data.data.is_submit btnApprove: response.data.data.is_submit_finance,
btnApproveCAT: response.data.data.is_submit_cat,
listReportTypeId: uniqueTypeIds
}, () => { }, () => {
// console.log(this.state.lastStatus); // console.log(this.state.lastStatus);
if (this.state.isAdmin) { if (this.state.isAdmin) {
...@@ -638,9 +707,9 @@ export default class OutlookPA extends Component { ...@@ -638,9 +707,9 @@ export default class OutlookPA extends Component {
api.create().checkApproverOLPA().then(response => { api.create().checkApproverOLPA().then(response => {
// console.log(response); // console.log(response);
if (response.data.data.is_approver === true) { if (response.data.data.is_approver === true) {
this.setState({ isApprover: true, checkApprover: true }) this.setState({ checkApprover: true, isApproverFinance: response.data.data.is_finance, isApproverCAT: response.data.data.is_cat, })
} else { } else {
this.setState({ isApprover: false, checkApprover: false }) this.setState({ isApprover: false, checkApprover: false, isApproverFinance: false, isApproverCAT: false, })
} }
}) })
...@@ -662,38 +731,41 @@ export default class OutlookPA extends Component { ...@@ -662,38 +731,41 @@ export default class OutlookPA extends Component {
} }
historyApproval() { historyApproval() {
let body = { this.state.listReportTypeId.forEach((master_report_type_id) => {
"company_id": this.state.company.company_id, let body = {
"periode": this.state.periode.periode "company_id": this.state.company.company_id,
} "periode": this.state.periode.periode,
api.create().historyApprovalOLPA(body).then(response => { master_report_type_id
// console.log(response);
if (response.data.data.length > 0) {
let dataTableHistory = response.data.data.map(item => {
return [
item.pic,
item.status_approval,
// String(item.status_approval).replace('APPROVAL_PROCCESS', 'WAITING FOR APPROVAL').replace('- -', ''),
item.remarks,
item.item_revision,
item.history_approval_date
]
})
this.setState({ dataTableHistory, visibleTableHistory: true })
} }
api.create().historyApprovalOLPA(body).then(response => {
// console.log(response);
if (response.data.data.length > 0) {
let dataTableHistory = response.data.data.map(item => {
return [
item.pic,
item.status_approval,
// String(item.status_approval).replace('APPROVAL_PROCCESS', 'WAITING FOR APPROVAL').replace('- -', ''),
item.remarks,
item.item_revision,
item.history_approval_date
]
})
this.setState({ dataTableHistory, visibleTableHistory: true })
}
})
}) })
} }
async setHeaderTokenSuperadmin(type) { async setHeaderTokenSuperadmin(type, master_report_type_id) {
let realToken = await localStorage.getItem(Constant.TOKEN) let realToken = await localStorage.getItem(Constant.TOKEN)
api.create().getIdToken(this.state.approver.userId).then((response) => { api.create().getIdToken(this.state.approver.userId).then((response) => {
console.log(response.data.data.token) console.log(response.data.data.token)
localStorage.setItem(Constant.TOKEN, response.data.data.token) localStorage.setItem(Constant.TOKEN, response.data.data.token)
this.approvalSubmission(type, realToken) this.approvalSubmission(type, master_report_type_id, realToken)
}) })
} }
approvalSubmission(type, realToken) { approvalSubmission(type, master_report_type_id, realToken) {
this.scrollToMyRef() this.scrollToMyRef()
// if (this.state.isAdmin && type == 'approve') { // if (this.state.isAdmin && type == 'approve') {
// api.create().getIdToken(this.state.approver.userId).then((response) => { // api.create().getIdToken(this.state.approver.userId).then((response) => {
...@@ -704,11 +776,12 @@ export default class OutlookPA extends Component { ...@@ -704,11 +776,12 @@ export default class OutlookPA extends Component {
// } // }
this.setState({ loading: true }) this.setState({ loading: true })
let body = { let body = {
"approval_id": this.props.location.state == undefined ? this.state.approverID : this.state.rawData.approval_id, "approval_id": !this.props.location.state ? master_report_type_id === 2 ? this.state.approverIDCAT : this.state.approverID : this.state.rawData.approval_id,
"status": type, "status": type,
"detail": this.state.detailRevisiCheck, "detail": this.state.detailRevisiCheck,
"is_superadmin": this.state.isAdmin, "is_superadmin": this.state.isAdmin,
"currency_id": this.state.defaultCurrency.id, "currency_id": this.state.defaultCurrency.id,
master_report_type_id
} }
let payload = { let payload = {
"company_id": this.state.company.company_id, "company_id": this.state.company.company_id,
...@@ -734,7 +807,7 @@ export default class OutlookPA extends Component { ...@@ -734,7 +807,7 @@ export default class OutlookPA extends Component {
// }) // })
if (this.state.isAdmin && type == 'approve') { if (this.state.isAdmin && type == 'approve') {
localStorage.setItem(Constant.TOKEN, realToken) localStorage.setItem(Constant.TOKEN, realToken)
this.setState({ visibleApproveSuperadmin: false }) this.setState({ visibleApproveSuperadmin: false, currentMasterReportTypeId: null })
} }
setTimeout(() => { setTimeout(() => {
if (type == 'revision') { if (type == 'revision') {
...@@ -746,8 +819,9 @@ export default class OutlookPA extends Component { ...@@ -746,8 +819,9 @@ export default class OutlookPA extends Component {
}, 100); }, 100);
} }
clickDetail(item, id, revision, status) { clickDetail(item, id, revision, status, tableKey) {
this.state.dataForRevision.map(i => { const listTable = tableKey === 'CAT' ? this.state.dataForRevisionCAT : this.state.dataForRevision
listTable.map(i => {
if (i.report_name === item) { if (i.report_name === item) {
if (i.revision == revision) { if (i.revision == revision) {
this.setState({ prevRevision: true }) this.setState({ prevRevision: true })
...@@ -759,7 +833,8 @@ export default class OutlookPA extends Component { ...@@ -759,7 +833,8 @@ export default class OutlookPA extends Component {
this.setState({ this.setState({
report_id: id, report_id: id,
revisionTable: revision, revisionTable: revision,
status: status status: status,
tableKey
}, () => { }, () => {
if (item === 'Balance Sheet') { if (item === 'Balance Sheet') {
this.setState({ this.setState({
...@@ -811,7 +886,7 @@ export default class OutlookPA extends Component { ...@@ -811,7 +886,7 @@ export default class OutlookPA extends Component {
}) })
} }
validateRevision() { validateRevision(master_report_type_id) {
let arrayRevisi = this.state.detailRevisiCheck let arrayRevisi = this.state.detailRevisiCheck
let remarksKosong = 0 let remarksKosong = 0
arrayRevisi.map((item, index) => { arrayRevisi.map((item, index) => {
...@@ -822,7 +897,7 @@ export default class OutlookPA extends Component { ...@@ -822,7 +897,7 @@ export default class OutlookPA extends Component {
if (remarksKosong > 0) { if (remarksKosong > 0) {
this.setState({ alert: true, messageAlert: 'Remarks Cannot be Empty', tipeAlert: 'error' }) this.setState({ alert: true, messageAlert: 'Remarks Cannot be Empty', tipeAlert: 'error' })
} else { } else {
this.setState({ visibleRevision: false }, () => this.approvalSubmission('revision')) this.setState({ visibleRevision: false }, () => this.approvalSubmission('revision', master_report_type_id))
} }
} }
...@@ -843,6 +918,7 @@ export default class OutlookPA extends Component { ...@@ -843,6 +918,7 @@ export default class OutlookPA extends Component {
formData.append("revision", Number(this.state.revision.revision)); formData.append("revision", Number(this.state.revision.revision));
formData.append("companyId", this.state.company.company_id); formData.append("companyId", this.state.company.company_id);
formData.append("periode", Number(this.state.periode.periode)); formData.append("periode", Number(this.state.periode.periode));
formData.append("master_report_type_id", this.state.currentMasterReportTypeId);
formData.append("file", event); formData.append("file", event);
this.setState({ formData }) this.setState({ formData })
} }
...@@ -961,11 +1037,12 @@ export default class OutlookPA extends Component { ...@@ -961,11 +1037,12 @@ export default class OutlookPA extends Component {
} }
} }
validate() { validate(master_report_type_id) {
this.setState({ loading: true }) this.setState({ loading: true })
let array = [] let array = []
let canSubmit = true let canSubmit = true
this.state.dataTable.map(item => { const listTable = master_report_type_id === 1 ? this.state.dataTable : this.state.dataTableCAT
listTable.map(item => {
if (item[3] !== "submitted" && item[3] !== 'approved') { if (item[3] !== "submitted" && item[3] !== 'approved') {
canSubmit = false canSubmit = false
array.push(item[3]) array.push(item[3])
...@@ -984,7 +1061,8 @@ export default class OutlookPA extends Component { ...@@ -984,7 +1061,8 @@ export default class OutlookPA extends Component {
}) })
if (canSubmit === true) { if (canSubmit === true) {
let body = { let body = {
outlook_pa_id: this.state.outlook_pa_id outlook_pa_id: this.state.outlook_pa_id,
master_report_type_id
} }
api.create().submitOLPA(body).then(response => { api.create().submitOLPA(body).then(response => {
// console.log(response); // console.log(response);
...@@ -1498,8 +1576,8 @@ export default class OutlookPA extends Component { ...@@ -1498,8 +1576,8 @@ export default class OutlookPA extends Component {
}) })
} }
handleApproveAdmin() { handleApproveAdmin(master_report_type_id) {
this.setState({ visibleApproveSuperadmin: true }) this.setState({ visibleApproveSuperadmin: true, currentMasterReportTypeId: master_report_type_id })
} }
handleSelectAll(data) { handleSelectAll(data) {
...@@ -1546,7 +1624,7 @@ export default class OutlookPA extends Component { ...@@ -1546,7 +1624,7 @@ export default class OutlookPA extends Component {
"month": "", "month": "",
"quartal": "", "quartal": "",
"type_report_name": "Outlook PA", "type_report_name": "Outlook PA",
"currency_id" : defaultCurrency.id "currency_id": defaultCurrency.id
} }
console.log(payload); console.log(payload);
api.create().createDownloadFile(payload).then((response) => { api.create().createDownloadFile(payload).then((response) => {
...@@ -1662,12 +1740,405 @@ export default class OutlookPA extends Component { ...@@ -1662,12 +1740,405 @@ export default class OutlookPA extends Component {
}) })
} }
getLastStatus = () => {
const { tableKey, lastStatus, lastStatusCat } = this.state
return tableKey === 'CAT' ? lastStatusCat : lastStatus
}
getSubmissionObj = (tableKeyParam) => {
const {
tableKey,
btnApprove,
btnApproveCAT,
lastStatus,
lastStatusCat,
submitter,
submitterCAT,
pic,
picCAT,
listAttachment,
listAttachmentCAT
} = this.state;
const key = tableKeyParam ?? tableKey;
return key === 2
? { btnApprove: btnApproveCAT, lastStatus: lastStatusCat, submitter: submitterCAT, pic: picCAT, listAttachment: listAttachmentCAT }
: { btnApprove, lastStatus, submitter, pic, listAttachment };
};
renderFilter = () => {
return (
<div >
<div style={{ display: "flex" }}>
<Autocomplete
{...this.state.listPeriode}
id="periode"
onChange={(event, newInputValue) => this.setState({ periode: newInputValue }, () => {
this.setState({ visibleTableHistory: false })
if (this.state.listCompany == null) {
console.log('yak')
this.getCompanySubmitted()
} else {
console.log('zz')
this.getRevision()
}
})}
disabled={this.state.intent === 'Home' ? true : false}
disableClearable
style={{ width: 250 }}
renderInput={(params) =>
<TextField {...params} label="Period" margin="normal" style={{ marginTop: 7 }}
/>}
value={this.state.periode}
/>
<Autocomplete
id="tipe"
disableClearable
options={this.state.currency}
getOptionLabel={(option) => option.value}
value={this.state.defaultCurrency}
// onChange={(event, newInputValue) => this.setState({ defaultCurrency: newInputValue })}
onChange={(event, newInputValue) => this.setState({ defaultCurrency: newInputValue }, () => {
this.getRevision()
})}
style={{ width: 250 }}
renderInput={(params) =>
<TextField
{...params}
variant="standard"
label="Currency"
margin="normal"
style={{ marginTop: 7, marginLeft: 20 }}
// InputProps={{ ...params.InputProps, style: { fontSize: 11 } }}
// InputLabelProps={{ style: { fontSize: 11, color: '#7e8085' } }}
/>
}
/>
</div>
<div style={{ marginTop: 20 }}>
<Autocomplete
multiple
id="tags-standard"
options={this.state.listStatus}
getOptionLabel={(option) => option.name}
style={{ width: 250 }}
onChange={(event, newInputValue) => {
this.setState({ selectedStatus: newInputValue, loading: true }, () => {
console.log(newInputValue);
this.getCompanySubmitted()
})
}}
value={this.state.selectedStatus}
renderInput={(params) => <TextField {...params} label="Submission Status" margin="normal" style={{ marginTop: 7 }} />}
/>
</div>
<div style={{ marginTop: 20 }}>
<Autocomplete
{...this.state.listCompany}
id="company"
disabled={this.state.intent === 'Home' ? true : false}
onChange={(event, newInputValue) => this.setState({ company: newInputValue }, () => {
this.setState({ visibleTableHistory: false })
this.getRevision()
this.getCurrency(newInputValue.company_id)
})}
disableClearable
style={{ width: 250 }}
renderInput={(params) => <TextField {...params} label="Company" margin="normal" style={{ marginTop: 7 }} />}
value={this.state.company}
/>
</div>
<div style={{ marginTop: 20 }}>
{/* <Autocomplete
{...this.state.listRevision}
id="revision"
onChange={(event, newInputValue) => this.setState({ revision: newInputValue }, () => {
this.getReport()
this.getReportAttachment()
})}
disabled={true}
disableClearable
style={{ width: 250 }}
renderInput={(params) => <TextField {...params} label="Revision" margin="normal" style={{ marginTop: 7 }} />}
value={this.state.revision}
/> */}
<TextField disabled={true} label="Revision" margin="normal" style={{ marginTop: 7, width: 250 }} value={this.state.lastRevision} />
</div>
</div>
)
}
renderAttachment = (master_report_type_id) => {
const _lastStatus = this.getLastStatus()
const obj = this.getSubmissionObj(master_report_type_id)
return (
<>
<div style={{ display: 'flex', marginTop: 20 }}>
<div style={{ width: '50%' }}>
<Typography style={{ fontSize: '16px', color: '#4b4b4b', fontWeight: 'bold' }}>Attachment: </Typography>
</div>
{!this.state.isApprover && (_lastStatus === 'SUBMIT' || _lastStatus === 'REVISION') && (
<div style={{ width: '50%' }}>
<button
style={{
backgroundColor: 'transparent',
cursor: this.state.isSubmit === false ? 'default' : 'pointer',
borderColor: 'transparent',
outline: 'none'
}}
onClick={() => this.setState({ visibleUpload: true, currentMasterReportTypeId: master_report_type_id })}
>
<Typography style={{ fontSize: '16px', color: this.state.isSubmit === false ? 'GrayText' : '#5198ea' }}>Upload File</Typography>
</button>
</div>
)}
</div>
<div style={{ display: 'flex', marginTop: 10 }}>
<div style={{ width: '50%', paddingLeft: 20 }}>
{obj.listAttachment.length > 0 ?
obj.listAttachment.map((item, index) => {
return (
<div style={{ display: 'flex' }}>
<Typography style={{ fontSize: '13px', color: '#4b4b4b', width: 25 }}>{index + 1}. </Typography>
<button
style={{
backgroundColor: 'transparent',
cursor: 'pointer',
borderColor: 'transparent',
outline: 'none',
display: 'grid'
}}
onClick={() => {
this.downloadAttachment(item.attachment_url, item.attachment_name)
}}
>
<div>
<Typography style={{ fontSize: '13px', color: '#5198ea' }}> {item.attachment_name}</Typography>
</div>
</button>
</div>
)
})
: null
}
</div>
{!this.state.isApprover && (_lastStatus === 'SUBMIT' || _lastStatus === 'REVISION') && (
<div style={{ width: '50%' }}>
{
obj.listAttachment.length > 0 ?
obj.listAttachment.map((item) => {
return (
<button
style={{
backgroundColor: 'transparent',
cursor: this.state.isSubmit === false ? 'default' : 'pointer',
borderColor: 'transparent',
outline: 'none',
display: 'grid'
}}
onClick={() => this.state.isSubmit === false ? null : this.deleteAttachment(item)}
>
<Typography style={{ fontSize: '13px', color: this.state.isSubmit === false ? 'GrayText' : '#ff3939' }}>Delete</Typography>
</button>
)
})
: null
}
</div>
)}
</div>
</>
)
}
renderHistoryInfo = (master_report_type_id) => {
const obj = this.getSubmissionObj(master_report_type_id)
return this.state.checkApprover === true ?
obj.lastStatus === 'WAITING FOR REVIEW' ?
<div style={{ width: '100%', padding: '10px 20px', backgroundColor: 'yellow', textAlign: 'center', marginTop: 20 }}>
<span>{obj.lastStatus}</span>
</div> : obj.lastStatus === 'WAITING FOR YOUR APPROVAL' ?
<div style={{ width: '100%', padding: '10px 20px', backgroundColor: 'yellow', textAlign: 'center', marginTop: 20 }}>
<span>{obj.lastStatus}</span>
</div> : obj.lastStatus === 'WAITING FOR APPROVAL' ?
<div style={{ width: '100%', padding: '10px 20px', backgroundColor: 'yellow', textAlign: 'center', marginTop: 20 }}>
<span>{`${obj.lastStatus} - ${obj.pic}`}</span>
</div> : obj.lastStatus === 'APPROVED' ?
<div style={{ width: '100%', padding: '10px 20px', backgroundColor: 'yellow', textAlign: 'center', marginTop: 20 }}>
<span>{`${obj.lastStatus}`}</span>
</div> : null
:
obj.lastStatus === 'SUBMITTED' ?
<div style={{ width: '100%', padding: '10px 20px', backgroundColor: 'yellow', textAlign: 'center', marginTop: 20 }}>
<span>{obj.lastStatus}</span>
</div> :
obj.lastStatus === 'WAITING FOR APPROVAL' ?
<div style={{ width: '100%', padding: '10px 20px', backgroundColor: 'yellow', textAlign: 'center', marginTop: 20 }}>
<span>{`${obj.lastStatus} - ${obj.pic}`}</span>
</div> :
obj.lastStatus === 'REVISION' ?
<div style={{ width: '100%', padding: '10px 20px', backgroundColor: 'yellow', textAlign: 'center', marginTop: 20 }}>
<span>NEED REVISION</span>
</div> :
obj.lastStatus === 'APPROVED' ?
<div style={{ width: '100%', padding: '10px 20px', backgroundColor: 'yellow', textAlign: 'center', marginTop: 20 }}>
<span>APPROVED</span>
</div> : null
}
renderBtnSubmit = (master_report_type_id) => {
const obj = this.getSubmissionObj(master_report_type_id)
return this.state.isAdmin && obj.lastStatus === 'APPROVED' ?
<div className="grid grid-2x" style={{ borderTop: 'solid 1px #c4c4c4', padding: 10, backgroundColor: '#f5f5f5', width: '100%', }}>
<div className="col-1" />
<div className="col-2" style={{ display: 'flex', justifyContent: 'flex-end', maxWidth: '100%' }}>
<button
style={{
backgroundColor: 'transparent',
cursor: 'pointer',
borderColor: 'transparent',
outline: 'none',
marginRight: 20
}}
onClick={() => this.setState({ visibleRevision: true, currentMasterReportTypeId: master_report_type_id })}
>
<div style={{ backgroundColor: '#019ce5', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Revision</Typography>
</div>
</button>
{/* <button
style={{
backgroundColor: 'transparent',
cursor: 'pointer',
borderColor: 'transparent',
outline: 'none',
}}
onClick={() => this.approvalSubmission('approve')}
>
<div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Approve</Typography>
</div>
</button> */}
</div>
</div>
:
this.state.isAdmin && (obj.lastStatus === 'WAITING FOR YOUR APPROVAL' || obj.lastStatus === 'WAITING FOR APPROVAL') ?
<div className="grid grid-2x" style={{ borderTop: 'solid 1px #c4c4c4', padding: 10, backgroundColor: '#f5f5f5', width: '100%', }}>
<div className="col-1" />
<div className="col-2" style={{ display: 'flex', justifyContent: 'flex-end', maxWidth: '100%' }}>
<button
style={{
backgroundColor: 'transparent',
cursor: 'pointer',
borderColor: 'transparent',
outline: 'none',
}}
onClick={() => this.handleApproveAdmin(master_report_type_id)}
>
<div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Approve</Typography>
</div>
</button>
</div>
</div>
:
this.state.checkApprover === true ?
obj.lastStatus === 'WAITING FOR REVIEW' ?
<div style={{ borderTop: 'solid 1px #c4c4c4', padding: 10, backgroundColor: '#f5f5f5', width: '100%', display: 'flex', justifyContent: 'flex-end' }} >
<button
style={{
backgroundColor: 'transparent',
cursor: 'pointer',
borderColor: 'transparent',
outline: 'none',
}}
onClick={() =>
this.approvalSubmission('review', master_report_type_id)
}
>
<div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Review</Typography>
</div>
</button>
</div> : (obj.lastStatus === 'WAITING FOR YOUR APPROVAL' && obj.btnApprove) ?
<div className="grid grid-2x" style={{ borderTop: 'solid 1px #c4c4c4', padding: 10, backgroundColor: '#f5f5f5', width: '100%', }}>
<div className="col-1">
<button
style={{
backgroundColor: 'transparent',
cursor: 'pointer',
borderColor: 'transparent',
outline: 'none',
}}
onClick={() => this.setState({ visibleRevision: true, currentMasterReportTypeId: master_report_type_id })}
>
<div style={{ backgroundColor: '#019ce5', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Revision</Typography>
</div>
</button>
</div>
<div className="col-2" style={{ display: 'flex', justifyContent: 'flex-end', maxWidth: '100%' }}>
<button
style={{
backgroundColor: 'transparent',
cursor: 'pointer',
borderColor: 'transparent',
outline: 'none',
}}
onClick={() => this.approvalSubmission('approve', master_report_type_id)}
>
<div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Approve</Typography>
</div>
</button>
</div>
</div> : null
:
(obj.lastStatus === 'SUBMIT' || obj.lastStatus === 'REVISION') && this.state.isSubmit === true ?
<div style={{ borderTop: 'solid 1px #c4c4c4', padding: 10, backgroundColor: '#f5f5f5', width: '100%', display: 'flex', justifyContent: 'flex-end' }} >
<button
style={{
backgroundColor: 'transparent',
cursor: 'pointer',
borderColor: 'transparent',
outline: 'none',
}}
onClick={() => this.validate(master_report_type_id)}
>
<div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Submit</Typography>
</div>
</button>
</div> :
obj.lastStatus === 'SUBMITTED' && obj.submitter ?
<div style={{ borderTop: 'solid 1px #c4c4c4', padding: 10, backgroundColor: '#f5f5f5', width: '100%', display: 'flex', justifyContent: 'flex-end' }} >
<button
style={{
backgroundColor: 'transparent',
cursor: 'pointer',
borderColor: 'transparent',
outline: 'none',
}}
onClick={() => this.approvalSubmission('cancel', master_report_type_id)}
>
<div style={{ backgroundColor: 'gray', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Cancel</Typography>
</div>
</button>
</div> : null
}
render() { render() {
const handleMaxDate = () => { const handleMaxDate = () => {
let handleDate = Number(moment(this.state.maxDateRevision).format('YYYYMMDD')) - Number(moment(this.state.minDateRevision).format('YYYYMMDD')) let handleDate = Number(moment(this.state.maxDateRevision).format('YYYYMMDD')) - Number(moment(this.state.minDateRevision).format('YYYYMMDD'))
return handleDate < 0 ? moment(this.state.minDateRevision).format('YYYY/MM/DD') : moment(this.state.maxDateRevision).format('YYYY/MM/DD') return handleDate < 0 ? moment(this.state.minDateRevision).format('YYYY/MM/DD') : moment(this.state.maxDateRevision).format('YYYY/MM/DD')
} }
const columns = ["#", "Report Type", const columns = (tableKey) => ["#", "Report Type",
{ {
name: "Revision", name: "Revision",
options: { options: {
...@@ -1746,7 +2217,7 @@ export default class OutlookPA extends Component { ...@@ -1746,7 +2217,7 @@ export default class OutlookPA extends Component {
}} }}
onClick={() => onClick={() =>
tableMeta.rowData[5] == true || (this.state.periode.periode == '2020' && tableMeta.rowData[1] == 'Balance Sheet' && tableMeta.rowData[3] == 'CLOSED') ? tableMeta.rowData[5] == true || (this.state.periode.periode == '2020' && tableMeta.rowData[1] == 'Balance Sheet' && tableMeta.rowData[3] == 'CLOSED') ?
this.clickDetail(tableMeta.rowData[1], tableMeta.rowData[4], tableMeta.rowData[2], tableMeta.rowData[3]) this.clickDetail(tableMeta.rowData[1], tableMeta.rowData[4], tableMeta.rowData[2], tableMeta.rowData[3], tableKey)
: null : null
} }
> >
...@@ -1788,7 +2259,7 @@ export default class OutlookPA extends Component { ...@@ -1788,7 +2259,7 @@ export default class OutlookPA extends Component {
"Name", "Status", "Remarks", "Revision Item", "Date" "Name", "Status", "Remarks", "Revision Item", "Date"
] ]
const columnRevisi = [ const columnRevisi = (master_report_type_id) => [
{ {
name: "#", name: "#",
options: { options: {
...@@ -1805,7 +2276,7 @@ export default class OutlookPA extends Component { ...@@ -1805,7 +2276,7 @@ export default class OutlookPA extends Component {
control={ control={
<Checkbox <Checkbox
checked={this.state.detailRevisiCheck.findIndex((val) => val.report_id == tableMeta.rowData[0]) == -1 ? false : true} checked={this.state.detailRevisiCheck.findIndex((val) => val.report_id == tableMeta.rowData[0]) == -1 ? false : true}
onClick={() => handleCheckRevision(tableMeta.rowData)} /> onClick={() => handleCheckRevision(tableMeta.rowData, master_report_type_id)} />
} }
/> />
</div > </div >
...@@ -1833,7 +2304,7 @@ export default class OutlookPA extends Component { ...@@ -1833,7 +2304,7 @@ export default class OutlookPA extends Component {
onBlur={(event) => { onBlur={(event) => {
// console.log(event.target.value) // console.log(event.target.value)
// updateValue(event.target.value) // updateValue(event.target.value)
handleChangeText(event.target.value, tableMeta) handleChangeText(event.target.value, tableMeta, master_report_type_id)
// console.log(dataTable2) // console.log(dataTable2)
}} }}
/>} />}
...@@ -1848,9 +2319,9 @@ export default class OutlookPA extends Component { ...@@ -1848,9 +2319,9 @@ export default class OutlookPA extends Component {
} }
] ]
const handleChangeText = (value, tableMeta) => { const handleChangeText = (value, tableMeta, master_report_type_id) => {
let dataTableRevision = this.state.dataTableRevision const listTableRevision = master_report_type_id === 2 ? this.state.dataTableRevisionCAT : this.state.dataTableRevision
dataTableRevision[tableMeta.rowIndex][tableMeta.columnIndex] = value listTableRevision[tableMeta.rowIndex][tableMeta.columnIndex] = value
let detailRevisiCheck = this.state.detailRevisiCheck let detailRevisiCheck = this.state.detailRevisiCheck
let indexId = detailRevisiCheck.findIndex((val) => val.report_id == tableMeta.rowData[0]) let indexId = detailRevisiCheck.findIndex((val) => val.report_id == tableMeta.rowData[0])
...@@ -1858,7 +2329,7 @@ export default class OutlookPA extends Component { ...@@ -1858,7 +2329,7 @@ export default class OutlookPA extends Component {
detailRevisiCheck[indexId].remarks = value detailRevisiCheck[indexId].remarks = value
} }
this.setState({ dataTableRevision, detailRevisiCheck }) this.setState({ [master_report_type_id === 2 ? "dataTableRevisionCAT" : "dataTableRevision"]: listTableRevision, detailRevisiCheck })
} }
// const handleCheckRevision = (value) => { // const handleCheckRevision = (value) => {
...@@ -1878,18 +2349,19 @@ export default class OutlookPA extends Component { ...@@ -1878,18 +2349,19 @@ export default class OutlookPA extends Component {
// // console.log(detailRevisiCheck) // // console.log(detailRevisiCheck)
// } // }
const handleCheckRevision = (value) => { const handleCheckRevision = (value, master_report_type_id) => {
const listTableRevision = master_report_type_id === 2 ? this.state.dataTableRevisionCAT : this.state.dataTableRevision
let detailRevisiCheck = this.state.detailRevisiCheck let detailRevisiCheck = this.state.detailRevisiCheck
let payload = { let payload = {
report_id: value[0], report_id: value[0],
remarks: value[2], remarks: value[2],
number: value[3] number: value[3]
} }
let indexDataRevisi = this.state.dataTableRevision.findIndex((val) => val[3] == value[3]) let indexDataRevisi = listTableRevision.findIndex((val) => val[3] == value[3])
let indexId = detailRevisiCheck.sort((a, b) => a.number - b.number).findIndex((val) => val.number == value[3]) let indexId = detailRevisiCheck.sort((a, b) => a.number - b.number).findIndex((val) => val.number == value[3])
// // console.log(indexId) // // console.log(indexId)
if (indexId == -1) { if (indexId == -1) {
this.state.dataTableRevision.map((item, index) => { listTableRevision.map((item, index) => {
if (index > indexDataRevisi) { if (index > indexDataRevisi) {
let indexIds = detailRevisiCheck.findIndex((val) => val.number == item[3]) let indexIds = detailRevisiCheck.findIndex((val) => val.number == item[3])
if (indexIds == -1) { if (indexIds == -1) {
...@@ -1912,7 +2384,7 @@ export default class OutlookPA extends Component { ...@@ -1912,7 +2384,7 @@ export default class OutlookPA extends Component {
} }
}) })
if (x < 1) { if (x < 1) {
this.state.dataTableRevision.map((item, index) => { listTableRevision.map((item, index) => {
if (index > indexDataRevisi) { if (index > indexDataRevisi) {
let indexIdz = detailRevisiCheck.findIndex((val) => val.number == item[3]) let indexIdz = detailRevisiCheck.findIndex((val) => val.number == item[3])
if (indexIdz !== -1) { if (indexIdz !== -1) {
...@@ -1971,6 +2443,8 @@ export default class OutlookPA extends Component { ...@@ -1971,6 +2443,8 @@ export default class OutlookPA extends Component {
/> />
</div> </div>
); );
const mstIdFinance = this.state?.rowDataFinance?.length > 0 && this.state.rowDataFinance[0]?.master_report_type_id
const mstIdCAT = this.state?.rowDataCAT?.length > 0 && this.state.rowDataCAT[0]?.master_report_type_id
return ( return (
<div style={{ flex: 1, backgroundColor: '#f8f8f8' }} ref={this.myRef}> <div style={{ flex: 1, backgroundColor: '#f8f8f8' }} ref={this.myRef}>
<Snackbar open={this.state.alert} autoHideDuration={6000} onClose={() => this.closeAlert()}> <Snackbar open={this.state.alert} autoHideDuration={6000} onClose={() => this.closeAlert()}>
...@@ -1990,251 +2464,54 @@ export default class OutlookPA extends Component { ...@@ -1990,251 +2464,54 @@ export default class OutlookPA extends Component {
<Typography style={{ fontSize: '12px', color: '#4b4b4b', margin: 10 }}>Outlook Performance Appraisal</Typography> <Typography style={{ fontSize: '12px', color: '#4b4b4b', margin: 10 }}>Outlook Performance Appraisal</Typography>
</div> </div>
<div style={{ padding: 20 }}> <div style={{ padding: 20 }}>
<div style={{ display: "flex" }}> {this.renderFilter()}
<Autocomplete
{...this.state.listPeriode}
id="periode"
onChange={(event, newInputValue) => this.setState({ periode: newInputValue }, () => {
this.setState({ visibleTableHistory: false })
if (this.state.listCompany == null) {
console.log('yak')
this.getCompanySubmitted()
} else {
console.log('zz')
this.getRevision()
}
})}
disabled={this.state.intent === 'Home' ? true : false}
disableClearable
style={{ width: 250 }}
renderInput={(params) =>
<TextField {...params} label="Period" margin="normal" style={{ marginTop: 7 }}
/>}
value={this.state.periode}
/>
<Autocomplete
id="tipe"
disableClearable
options={this.state.currency}
getOptionLabel={(option) => option.value}
value={this.state.defaultCurrency}
// onChange={(event, newInputValue) => this.setState({ defaultCurrency: newInputValue })}
onChange={(event, newInputValue) => this.setState({ defaultCurrency: newInputValue }, () => {
this.getRevision()
})}
style={{ width: 250 }}
renderInput={(params) =>
<TextField
{...params}
variant="standard"
label="Currency"
margin="normal"
style={{ marginTop: 7, marginLeft: 20 }}
// InputProps={{ ...params.InputProps, style: { fontSize: 11 } }}
// InputLabelProps={{ style: { fontSize: 11, color: '#7e8085' } }}
/>
}
/>
</div>
<div style={{ marginTop: 20 }}>
<Autocomplete
multiple
id="tags-standard"
options={this.state.listStatus}
getOptionLabel={(option) => option.name}
style={{ width: 250 }}
onChange={(event, newInputValue) => {
this.setState({ selectedStatus: newInputValue, loading: true }, () => {
console.log(newInputValue);
this.getCompanySubmitted()
})
}}
value={this.state.selectedStatus}
renderInput={(params) => <TextField {...params} label="Submission Status" margin="normal" style={{ marginTop: 7 }} />}
/>
</div>
<div style={{ marginTop: 20 }}> <div style={{ marginTop: 20 }}>
<Autocomplete <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
{...this.state.listCompany} <Typography style={{ fontSize: '16px', color: '#4b4b4b', fontWeight: 'bold' }}>Report Finance</Typography>
id="company" <div style={{ display: 'flex', margin: '20px 15px' }}>
disabled={this.state.intent === 'Home' ? true : false}
onChange={(event, newInputValue) => this.setState({ company: newInputValue }, () => {
this.setState({ visibleTableHistory: false })
this.getRevision()
this.getCurrency(newInputValue.company_id)
})}
disableClearable
style={{ width: 250 }}
renderInput={(params) => <TextField {...params} label="Company" margin="normal" style={{ marginTop: 7 }} />}
value={this.state.company}
/>
</div>
<div style={{ marginTop: 20 }}>
{/* <Autocomplete
{...this.state.listRevision}
id="revision"
onChange={(event, newInputValue) => this.setState({ revision: newInputValue }, () => {
this.getReport()
this.getReportAttachment()
})}
disabled={true}
disableClearable
style={{ width: 250 }}
renderInput={(params) => <TextField {...params} label="Revision" margin="normal" style={{ marginTop: 7 }} />}
value={this.state.revision}
/> */}
<TextField disabled={true} label="Revision" margin="normal" style={{ marginTop: 7, width: 250 }} value={this.state.lastRevision} />
</div>
<div style={{ marginTop: 20 }}>
<div style={{ display: 'flex', justifyContent: 'flex-end', margin: '20px 15px' }}>
<button
className="button"
type="button"
style={{
backgroundColor: 'transparent',
cursor: 'pointer',
borderColor: 'transparent',
outline: 'none',
marginRight: 20
}}
onClick={() => this.handleSelectAll(this.state.dataTable)}
>
<div style={{ backgroundColor: '#fff', width: 100, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center', border: 'solid 1px #354960' }}>
<Typography style={{ fontSize: '11px', color: '#354960', textAlign: 'center' }}>Check All</Typography>
</div>
</button>
<button
type="button"
disabled={this.state.buttonError}
onClick={() => this.state.selectReport.length > 0 ? this.handleDownloadReport(this.state.dataTable) : alert("Anda harus memilih report yang ingin di download terlebih dahulu!")}
style={{
backgroundColor: 'transparent',
borderColor: 'transparent',
outline: 'none',
}}
>
<div style={{ backgroundColor: '#354960', width: 100, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Download</Typography>
</div>
</button>
</div>
<MuiThemeProvider theme={getMuiTheme()}>
<MUIDataTable
data={this.state.dataTable}
columns={columns}
options={options}
/>
</MuiThemeProvider>
</div>
<div style={{ display: 'flex', marginTop: 20 }}>
<div style={{ width: '50%' }}>
<Typography style={{ fontSize: '16px', color: '#4b4b4b', fontWeight: 'bold' }}>Attachment: </Typography>
</div>
{!this.state.isApprover && (this.state.lastStatus === 'SUBMIT' || this.state.lastStatus === 'REVISION') && (
<div style={{ width: '50%' }}>
<button <button
className="button"
type="button"
style={{ style={{
backgroundColor: 'transparent', backgroundColor: 'transparent',
cursor: this.state.isSubmit === false ? 'default' : 'pointer', cursor: 'pointer',
borderColor: 'transparent', borderColor: 'transparent',
outline: 'none' outline: 'none',
marginRight: 20
}} }}
onClick={() => this.state.isSubmit === false ? null : this.setState({ visibleUpload: true })} onClick={() => this.handleSelectAll(this.state.dataTable)}
> >
<Typography style={{ fontSize: '16px', color: this.state.isSubmit === false ? 'GrayText' : '#5198ea' }}>Upload File</Typography> <div style={{ backgroundColor: '#fff', width: 100, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center', border: 'solid 1px #354960' }}>
<Typography style={{ fontSize: '11px', color: '#354960', textAlign: 'center' }}>Check All</Typography>
</div>
</button>
<button
type="button"
disabled={this.state.buttonError}
onClick={() => this.state.selectReport.length > 0 ? this.handleDownloadReport(this.state.dataTable) : alert("Anda harus memilih report yang ingin di download terlebih dahulu!")}
style={{
backgroundColor: 'transparent',
borderColor: 'transparent',
outline: 'none',
}}
>
<div style={{ backgroundColor: '#354960', width: 100, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Download</Typography>
</div>
</button> </button>
</div> </div>
)}
</div>
<div style={{ display: 'flex', marginTop: 10 }}>
<div style={{ width: '50%', paddingLeft: 20 }}>
{this.state.listAttachment.length > 0 ?
this.state.listAttachment.map((item, index) => {
return (
<div style={{ display: 'flex' }}>
<Typography style={{ fontSize: '13px', color: '#4b4b4b', width: 25 }}>{index + 1}. </Typography>
<button
style={{
backgroundColor: 'transparent',
cursor: 'pointer',
borderColor: 'transparent',
outline: 'none',
display: 'grid'
}}
onClick={() => {
this.downloadAttachment(item.attachment_url, item.attachment_name)
}}
>
<div>
<Typography style={{ fontSize: '13px', color: '#5198ea' }}> {item.attachment_name}</Typography>
</div>
</button>
</div>
)
})
: null
}
</div> </div>
{!this.state.isApprover && (this.state.lastStatus === 'SUBMIT' || this.state.lastStatus === 'REVISION') && ( <MuiThemeProvider theme={getMuiTheme()}>
<div style={{ width: '50%' }}> <MUIDataTable
{ data={this.state.dataTable}
this.state.listAttachment.length > 0 ? columns={columns('FINANCE')}
this.state.listAttachment.map((item) => { options={options}
return ( />
<button </MuiThemeProvider>
style={{
backgroundColor: 'transparent',
cursor: this.state.isSubmit === false ? 'default' : 'pointer',
borderColor: 'transparent',
outline: 'none',
display: 'grid'
}}
onClick={() => this.state.isSubmit === false ? null : this.deleteAttachment(item)}
>
<Typography style={{ fontSize: '13px', color: this.state.isSubmit === false ? 'GrayText' : '#ff3939' }}>Delete</Typography>
</button>
)
})
: null
}
</div>
)}
</div> </div>
{this.state.checkApprover === true ? {this.renderAttachment(mstIdFinance)}
this.state.lastStatus === 'WAITING FOR REVIEW' ? {this.renderHistoryInfo(mstIdFinance)}
<div style={{ width: '100%', padding: '10px 20px', backgroundColor: 'yellow', textAlign: 'center', marginTop: 20 }}>
<span>{this.state.lastStatus}</span>
</div> : this.state.lastStatus === 'WAITING FOR YOUR APPROVAL' ?
<div style={{ width: '100%', padding: '10px 20px', backgroundColor: 'yellow', textAlign: 'center', marginTop: 20 }}>
<span>{this.state.lastStatus}</span>
</div> : this.state.lastStatus === 'WAITING FOR APPROVAL' ?
<div style={{ width: '100%', padding: '10px 20px', backgroundColor: 'yellow', textAlign: 'center', marginTop: 20 }}>
<span>{`${this.state.lastStatus} - ${this.state.pic}`}</span>
</div> : this.state.lastStatus === 'APPROVED' ?
<div style={{ width: '100%', padding: '10px 20px', backgroundColor: 'yellow', textAlign: 'center', marginTop: 20 }}>
<span>{`${this.state.lastStatus}`}</span>
</div> : null
:
this.state.lastStatus === 'SUBMITTED' ?
<div style={{ width: '100%', padding: '10px 20px', backgroundColor: 'yellow', textAlign: 'center', marginTop: 20 }}>
<span>{this.state.lastStatus}</span>
</div> :
this.state.lastStatus === 'WAITING FOR APPROVAL' ?
<div style={{ width: '100%', padding: '10px 20px', backgroundColor: 'yellow', textAlign: 'center', marginTop: 20 }}>
<span>{`${this.state.lastStatus} - ${this.state.pic}`}</span>
</div> :
this.state.lastStatus === 'REVISION' ?
<div style={{ width: '100%', padding: '10px 20px', backgroundColor: 'yellow', textAlign: 'center', marginTop: 20 }}>
<span>NEED REVISION</span>
</div> :
this.state.lastStatus === 'APPROVED' ?
<div style={{ width: '100%', padding: '10px 20px', backgroundColor: 'yellow', textAlign: 'center', marginTop: 20 }}>
<span>APPROVED</span>
</div> : null
}
{this.state.visibleTableHistory && ( {this.state.visibleTableHistory && (
<div style={{ marginTop: 20 }}> <div style={{ marginTop: 20 }}>
<MuiThemeProvider theme={getMuiTheme()}> <MuiThemeProvider theme={getMuiTheme()}>
...@@ -2247,147 +2524,50 @@ export default class OutlookPA extends Component { ...@@ -2247,147 +2524,50 @@ export default class OutlookPA extends Component {
</div> </div>
)} )}
</div> </div>
{this.state.isAdmin && this.state.lastStatus == 'APPROVED' ? {((this.state.checkApprover && this.state.isApproverFinance) || this.state.submitter) && this.renderBtnSubmit(mstIdFinance)}
<div className="grid grid-2x" style={{ borderTop: 'solid 1px #c4c4c4', padding: 10, backgroundColor: '#f5f5f5', width: '100%', }}> <div style={{ padding: '0 20px 20px' }}>
<div className="col-1" /> <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
<div className="col-2" style={{ display: 'flex', justifyContent: 'flex-end', maxWidth: '100%' }}> <Typography style={{ fontSize: '16px', color: '#4b4b4b', fontWeight: 'bold' }}>Report CAT</Typography>
<div style={{ display: 'flex', margin: '24px 5px' }}>
<button <button
type="button"
disabled={this.state.buttonError}
onClick={() => this.state.selectReport.length > 0 ? this.handleDownloadReport(this.state.dataTableCAT) : alert("Anda harus memilih report yang ingin di download terlebih dahulu!")}
style={{ style={{
backgroundColor: 'transparent', backgroundColor: 'transparent',
cursor: 'pointer',
borderColor: 'transparent', borderColor: 'transparent',
outline: 'none', outline: 'none',
marginRight: 20
}} }}
onClick={() => this.setState({ visibleRevision: true })}
> >
<div style={{ backgroundColor: '#019ce5', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}> <div style={{ backgroundColor: '#354960', width: 100, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Revision</Typography> <Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Download</Typography>
</div> </div>
</button> </button>
{/* <button
style={{
backgroundColor: 'transparent',
cursor: 'pointer',
borderColor: 'transparent',
outline: 'none',
}}
onClick={() => this.approvalSubmission('approve')}
>
<div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Approve</Typography>
</div>
</button> */}
</div> </div>
</div> </div>
: <MuiThemeProvider theme={getMuiTheme()}>
this.state.isAdmin && (this.state.lastStatus == 'WAITING FOR YOUR APPROVAL' || this.state.lastStatus == 'WAITING FOR APPROVAL') ? <MUIDataTable
<div className="grid grid-2x" style={{ borderTop: 'solid 1px #c4c4c4', padding: 10, backgroundColor: '#f5f5f5', width: '100%', }}> data={this.state.dataTableCAT}
<div className="col-1" /> columns={columns('CAT')}
<div className="col-2" style={{ display: 'flex', justifyContent: 'flex-end', maxWidth: '100%' }}> options={options}
<button />
style={{ </MuiThemeProvider>
backgroundColor: 'transparent', {this.renderAttachment(mstIdCAT)}
cursor: 'pointer', {this.renderHistoryInfo(mstIdCAT)}
borderColor: 'transparent', {this.state.visibleTableHistoryCAT && (
outline: 'none', <div style={{ marginTop: 20 }}>
}} <MuiThemeProvider theme={getMuiTheme()}>
onClick={() => this.handleApproveAdmin()} <MUIDataTable
> data={this.state.dataTableHistoryCAT}
<div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}> columns={columnsHistory}
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Approve</Typography> options={optionsHistory}
</div> />
</button> </MuiThemeProvider>
</div>
</div> </div>
: )}
this.state.checkApprover === true ? </div>
this.state.lastStatus === 'WAITING FOR REVIEW' ? {((this.state.checkApprover && this.state.isApproverCAT) || this.state.submitterCAT) && this.renderBtnSubmit(mstIdCAT)}
<div style={{ borderTop: 'solid 1px #c4c4c4', padding: 10, backgroundColor: '#f5f5f5', width: '100%', display: 'flex', justifyContent: 'flex-end' }} >
<button
style={{
backgroundColor: 'transparent',
cursor: 'pointer',
borderColor: 'transparent',
outline: 'none',
}}
onClick={() =>
this.approvalSubmission('review')
}
>
<div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Review</Typography>
</div>
</button>
</div> : (this.state.lastStatus === 'WAITING FOR YOUR APPROVAL' && this.state.btnApprove) ?
<div className="grid grid-2x" style={{ borderTop: 'solid 1px #c4c4c4', padding: 10, backgroundColor: '#f5f5f5', width: '100%', }}>
<div className="col-1">
<button
style={{
backgroundColor: 'transparent',
cursor: 'pointer',
borderColor: 'transparent',
outline: 'none',
}}
onClick={() => this.setState({ visibleRevision: true })}
>
<div style={{ backgroundColor: '#019ce5', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Revision</Typography>
</div>
</button>
</div>
<div className="col-2" style={{ display: 'flex', justifyContent: 'flex-end', maxWidth: '100%' }}>
<button
style={{
backgroundColor: 'transparent',
cursor: 'pointer',
borderColor: 'transparent',
outline: 'none',
}}
onClick={() => this.approvalSubmission('approve')}
>
<div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Approve</Typography>
</div>
</button>
</div>
</div> : null
:
(this.state.lastStatus === 'SUBMIT' || this.state.lastStatus === 'REVISION') && this.state.isSubmit === true ?
<div style={{ borderTop: 'solid 1px #c4c4c4', padding: 10, backgroundColor: '#f5f5f5', width: '100%', display: 'flex', justifyContent: 'flex-end' }} >
<button
style={{
backgroundColor: 'transparent',
cursor: 'pointer',
borderColor: 'transparent',
outline: 'none',
}}
onClick={() => this.validate()}
>
<div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Submit</Typography>
</div>
</button>
</div> :
this.state.lastStatus === 'SUBMITTED' && this.state.submitter ?
<div style={{ borderTop: 'solid 1px #c4c4c4', padding: 10, backgroundColor: '#f5f5f5', width: '100%', display: 'flex', justifyContent: 'flex-end' }} >
<button
style={{
backgroundColor: 'transparent',
cursor: 'pointer',
borderColor: 'transparent',
outline: 'none',
}}
onClick={() => this.approvalSubmission('cancel')}
>
<div style={{ backgroundColor: 'gray', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Cancel</Typography>
</div>
</button>
</div> : null
}
</Paper> </Paper>
</div> </div>
</div> </div>
)} )}
...@@ -2405,7 +2585,7 @@ export default class OutlookPA extends Component { ...@@ -2405,7 +2585,7 @@ export default class OutlookPA extends Component {
<button <button
type="button" type="button"
className="btn btn-circle btn-white" className="btn btn-circle btn-white"
onClick={() => this.setState({ visibleUpload: false })} onClick={() => this.setState({ visibleUpload: false, currentMasterReportTypeId: null })}
> >
<img src={Images.close} /> <img src={Images.close} />
</button> </button>
...@@ -2442,7 +2622,7 @@ export default class OutlookPA extends Component { ...@@ -2442,7 +2622,7 @@ export default class OutlookPA extends Component {
onClickClose={() => this.setState({ visibleBS: false, visibleOutlookPA: true })} onClickClose={() => this.setState({ visibleBS: false, visibleOutlookPA: true })}
getReport={this.getOutlookPAID.bind(this)} getReport={this.getOutlookPAID.bind(this)}
isApprover={this.state.isApprover} isApprover={this.state.isApprover}
lastStatus={this.state.lastStatus} lastStatus={this.getLastStatus()}
prevRevision={this.state.isSubmit ? this.state.prevRevision : true} prevRevision={this.state.isSubmit ? this.state.prevRevision : true}
status={this.state.status} status={this.state.status}
/> />
...@@ -2464,7 +2644,7 @@ export default class OutlookPA extends Component { ...@@ -2464,7 +2644,7 @@ export default class OutlookPA extends Component {
getReport={this.getOutlookPAID.bind(this)} getReport={this.getOutlookPAID.bind(this)}
status={this.state.status} status={this.state.status}
isApprover={this.state.isApprover} isApprover={this.state.isApprover}
lastStatus={this.state.lastStatus} lastStatus={this.getLastStatus()}
prevRevision={this.state.isSubmit ? this.state.prevRevision : true} prevRevision={this.state.isSubmit ? this.state.prevRevision : true}
/> />
...@@ -2486,7 +2666,7 @@ export default class OutlookPA extends Component { ...@@ -2486,7 +2666,7 @@ export default class OutlookPA extends Component {
getReport={this.getOutlookPAID.bind(this)} getReport={this.getOutlookPAID.bind(this)}
status={this.state.status} status={this.state.status}
isApprover={this.state.isApprover} isApprover={this.state.isApprover}
lastStatus={this.state.lastStatus} lastStatus={this.getLastStatus()}
prevRevision={this.state.isSubmit ? this.state.prevRevision : true} prevRevision={this.state.isSubmit ? this.state.prevRevision : true}
/> />
)} )}
...@@ -2507,9 +2687,9 @@ export default class OutlookPA extends Component { ...@@ -2507,9 +2687,9 @@ export default class OutlookPA extends Component {
getReport={this.getOutlookPAID.bind(this)} getReport={this.getOutlookPAID.bind(this)}
status={this.state.status} status={this.state.status}
isApprover={this.state.isApprover} isApprover={this.state.isApprover}
lastStatus={this.state.lastStatus} lastStatus={this.getLastStatus()}
prevRevision={this.state.isSubmit ? this.state.prevRevision : true} prevRevision={this.state.isSubmit ? this.state.prevRevision : true}
PLBSFAMSubmitted={this.state.lastStatus == 'APPROVED' ? true : false} PLBSFAMSubmitted={this.getLastStatus() === 'APPROVED' ? true : false}
/> />
)} )}
{this.state.visibleCAT && ( {this.state.visibleCAT && (
...@@ -2528,7 +2708,7 @@ export default class OutlookPA extends Component { ...@@ -2528,7 +2708,7 @@ export default class OutlookPA extends Component {
onClickClose={() => this.setState({ visibleCAT: false, visibleOutlookPA: true })} onClickClose={() => this.setState({ visibleCAT: false, visibleOutlookPA: true })}
getReport={this.getOutlookPAID.bind(this)} getReport={this.getOutlookPAID.bind(this)}
isApprover={this.state.isApprover} isApprover={this.state.isApprover}
lastStatus={this.state.lastStatus} lastStatus={this.getLastStatus()}
prevRevision={this.state.isSubmit ? this.state.prevRevision : true} prevRevision={this.state.isSubmit ? this.state.prevRevision : true}
status={this.state.status} status={this.state.status}
/> />
...@@ -2547,7 +2727,7 @@ export default class OutlookPA extends Component { ...@@ -2547,7 +2727,7 @@ export default class OutlookPA extends Component {
<button <button
type="button" type="button"
className="btn btn-circle btn-white" className="btn btn-circle btn-white"
onClick={() => this.setState({ visibleRevision: false })} onClick={() => this.setState({ visibleRevision: false, currentMasterReportTypeId: null })}
> >
<img src={Images.close} /> <img src={Images.close} />
</button> </button>
...@@ -2558,7 +2738,7 @@ export default class OutlookPA extends Component { ...@@ -2558,7 +2738,7 @@ export default class OutlookPA extends Component {
<div style={{ marginTop: 20 }}> <div style={{ marginTop: 20 }}>
<MuiThemeProvider theme={getMuiTheme()}> <MuiThemeProvider theme={getMuiTheme()}>
<MUIDataTable <MUIDataTable
data={this.state.dataTableRevision} data={this.state.currentMasterReportTypeId === 2 ? this.state.dataTableRevisionCAT : this.state.dataTableRevision}
columns={columnRevisi} columns={columnRevisi}
options={optionsRevision} options={optionsRevision}
/> />
...@@ -2630,7 +2810,7 @@ export default class OutlookPA extends Component { ...@@ -2630,7 +2810,7 @@ export default class OutlookPA extends Component {
<div className="column-1" style={{ alignSelf: 'center' }}> <div className="column-1" style={{ alignSelf: 'center' }}>
<button <button
type="button" type="button"
onClick={() => this.setState({ visibleRevision: false })} onClick={() => this.setState({ visibleRevision: false, currentMasterReportTypeId: null })}
> >
<div style={{ width: 102, height: 30, border: 'solid 1px #354960', borderRadius: 5, alignItems: 'center', display: 'flex', justifyContent: 'center' }}> <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> <span style={{ color: '#354960', fontSize: 11 }}>Cancel</span>
...@@ -2640,7 +2820,7 @@ export default class OutlookPA extends Component { ...@@ -2640,7 +2820,7 @@ export default class OutlookPA extends Component {
<div className="column-2" style={{ display: 'flex', justifyContent: 'flex-end', alignItems: 'center' }}> <div className="column-2" style={{ display: 'flex', justifyContent: 'flex-end', alignItems: 'center' }}>
<button <button
type="button" type="button"
onClick={() => this.validateRevision()} onClick={() => this.validateRevision(this.state.currentMasterReportTypeId)}
> >
<div style={{ width: 102, height: 30, backgroundColor: '#354960', borderRadius: 5, alignItems: 'center', display: 'flex', justifyContent: 'center' }}> <div style={{ width: 102, height: 30, backgroundColor: '#354960', borderRadius: 5, alignItems: 'center', display: 'flex', justifyContent: 'center' }}>
<span style={{ color: '#fff', fontSize: 11 }}>Revision</span> <span style={{ color: '#fff', fontSize: 11 }}>Revision</span>
...@@ -2665,7 +2845,7 @@ export default class OutlookPA extends Component { ...@@ -2665,7 +2845,7 @@ export default class OutlookPA extends Component {
<button <button
type="button" type="button"
className="btn btn-circle btn-white" className="btn btn-circle btn-white"
onClick={() => this.setState({ visibleApproveSuperadmin: false })} onClick={() => this.setState({ visibleApproveSuperadmin: false, currentMasterReportTypeId: null })}
> >
<img src={Images.close} /> <img src={Images.close} />
</button> </button>
...@@ -2692,7 +2872,7 @@ export default class OutlookPA extends Component { ...@@ -2692,7 +2872,7 @@ export default class OutlookPA extends Component {
<div className="column-1" style={{ alignSelf: 'center' }}> <div className="column-1" style={{ alignSelf: 'center' }}>
<button <button
type="button" type="button"
onClick={() => this.setState({ visibleApproveSuperadmin: false })} onClick={() => this.setState({ visibleApproveSuperadmin: false, currentMasterReportTypeId: null })}
> >
<div style={{ width: 102, height: 30, border: 'solid 1px #354960', borderRadius: 5, alignItems: 'center', display: 'flex', justifyContent: 'center' }}> <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> <span style={{ color: '#354960', fontSize: 11 }}>Cancel</span>
...@@ -2702,7 +2882,7 @@ export default class OutlookPA extends Component { ...@@ -2702,7 +2882,7 @@ export default class OutlookPA extends Component {
<div className="column-2" style={{ display: 'flex', justifyContent: 'flex-end', alignItems: 'center' }}> <div className="column-2" style={{ display: 'flex', justifyContent: 'flex-end', alignItems: 'center' }}>
<button <button
type="button" type="button"
onClick={() => this.state.approver == null ? this.setState({ alert: true, messageAlert: 'Approver Cannot be Empty', tipeAlert: 'error' }) : this.setHeaderTokenSuperadmin('approve')} onClick={() => this.state.approver == null ? this.setState({ alert: true, messageAlert: 'Approver Cannot be Empty', tipeAlert: 'error' }) : this.setHeaderTokenSuperadmin('approve', this.state.currentMasterReportTypeId)}
> >
<div style={{ width: 102, height: 30, backgroundColor: '#354960', borderRadius: 5, alignItems: 'center', display: 'flex', justifyContent: 'center' }}> <div style={{ width: 102, height: 30, backgroundColor: '#354960', borderRadius: 5, alignItems: 'center', display: 'flex', justifyContent: 'center' }}>
<span style={{ color: '#fff', fontSize: 11 }}>Confirm Approve</span> <span style={{ color: '#fff', fontSize: 11 }}>Confirm Approve</span>
......
This source diff could not be displayed because it is too large. You can view the blob instead.
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