Commit c5f77f47 authored by Riri Novita's avatar Riri Novita

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

parents 9ead75a6 a8e08a8f
......@@ -1362,7 +1362,8 @@ export default class BalanceSheet extends Component {
null
:
tableMeta.rowData[0] === 7 ?
(fixNumber(Number(handleValidation(value, tableMeta)), 1) >= Number(this.state.minValue) && fixNumber(Number(handleValidation(value, tableMeta)), 1) <= Number(this.state.maxValue)) ?
(this.props.defaultCurrency.id === 1 ? fixNumber(Number(handleValidation(value, tableMeta)), 1) : fixNumber(Number(handleValidation(value, tableMeta)), 12) >= Number(this.state.minValue) && this.props.defaultCurrency.id === 1 ? fixNumber(Number(handleValidation(value, tableMeta)), 1) : fixNumber(Number(handleValidation(value, tableMeta)), 12) <= Number(this.state.maxValue)) ?
// (fixNumber(Number(handleValidation(value, tableMeta)), 12) >= Number(this.state.minValue) && fixNumber(Number(handleValidation(value, tableMeta)), 12) <= Number(this.state.maxValue)) ?
<NumberFormat
thousandSeparator={true}
style={{
......@@ -1550,7 +1551,8 @@ export default class BalanceSheet extends Component {
null
:
tableMeta.rowData[0] === 7 ?
(fixNumber(Number(handleValidation(value, tableMeta)), 1) >= Number(this.state.minValue) && fixNumber(Number(handleValidation(value, tableMeta)), 1) <= Number(this.state.maxValue)) ?
(this.props.defaultCurrency.id === 1 ? fixNumber(Number(handleValidation(value, tableMeta)), 1) : fixNumber(Number(handleValidation(value, tableMeta)), 12) >= Number(this.state.minValue) && this.props.defaultCurrency.id === 1 ? fixNumber(Number(handleValidation(value, tableMeta)), 1) : fixNumber(Number(handleValidation(value, tableMeta)), 12) <= Number(this.state.maxValue)) ?
// (fixNumber(Number(handleValidation(value, tableMeta)), 12) >= Number(this.state.minValue) && fixNumber(Number(handleValidation(value, tableMeta)), 12) <= Number(this.state.maxValue)) ?
<NumberFormat
thousandSeparator={true}
style={{
......@@ -1737,7 +1739,8 @@ export default class BalanceSheet extends Component {
null
:
tableMeta.rowData[0] === 7 ?
(fixNumber(Number(handleValidation(value, tableMeta)), 1) >= Number(this.state.minValue) && fixNumber(Number(handleValidation(value, tableMeta)), 1) <= Number(this.state.maxValue)) ?
(this.props.defaultCurrency.id === 1 ? fixNumber(Number(handleValidation(value, tableMeta)), 1) : fixNumber(Number(handleValidation(value, tableMeta)), 12) >= Number(this.state.minValue) && this.props.defaultCurrency.id === 1 ? fixNumber(Number(handleValidation(value, tableMeta)), 1) : fixNumber(Number(handleValidation(value, tableMeta)), 12) <= Number(this.state.maxValue)) ?
// (fixNumber(Number(handleValidation(value, tableMeta)), 12) >= Number(this.state.minValue) && fixNumber(Number(handleValidation(value, tableMeta)), 12) <= Number(this.state.maxValue)) ?
<NumberFormat
thousandSeparator={true}
style={{
......@@ -1924,7 +1927,8 @@ export default class BalanceSheet extends Component {
null
:
tableMeta.rowData[0] === 7 ?
(fixNumber(Number(handleValidation(value, tableMeta)), 1) >= Number(this.state.minValue) && fixNumber(Number(handleValidation(value, tableMeta)), 1) <= Number(this.state.maxValue)) ?
(this.props.defaultCurrency.id === 1 ? fixNumber(Number(handleValidation(value, tableMeta)), 1) : fixNumber(Number(handleValidation(value, tableMeta)), 12) >= Number(this.state.minValue) && this.props.defaultCurrency.id === 1 ? fixNumber(Number(handleValidation(value, tableMeta)), 1) : fixNumber(Number(handleValidation(value, tableMeta)), 12) <= Number(this.state.maxValue)) ?
// (fixNumber(Number(handleValidation(value, tableMeta)), 12) >= Number(this.state.minValue) && fixNumber(Number(handleValidation(value, tableMeta)), 12) <= Number(this.state.maxValue)) ?
<NumberFormat
thousandSeparator={true}
style={{
......@@ -2111,7 +2115,8 @@ export default class BalanceSheet extends Component {
null
:
tableMeta.rowData[0] === 7 ?
(fixNumber(Number(handleValidation(value, tableMeta)), 1) >= Number(this.state.minValue) && fixNumber(Number(handleValidation(value, tableMeta)), 1) <= Number(this.state.maxValue)) ?
(this.props.defaultCurrency.id === 1 ? fixNumber(Number(handleValidation(value, tableMeta)), 1) : fixNumber(Number(handleValidation(value, tableMeta)), 12) >= Number(this.state.minValue) && this.props.defaultCurrency.id === 1 ? fixNumber(Number(handleValidation(value, tableMeta)), 1) : fixNumber(Number(handleValidation(value, tableMeta)), 12) <= Number(this.state.maxValue)) ?
// (fixNumber(Number(handleValidation(value, tableMeta)), 12) >= Number(this.state.minValue) && fixNumber(Number(handleValidation(value, tableMeta)), 12) <= Number(this.state.maxValue)) ?
<NumberFormat
thousandSeparator={true}
style={{
......@@ -2298,7 +2303,8 @@ export default class BalanceSheet extends Component {
null
:
tableMeta.rowData[0] === 7 ?
(fixNumber(Number(handleValidation(value, tableMeta)), 1) >= Number(this.state.minValue) && fixNumber(Number(handleValidation(value, tableMeta)), 1) <= Number(this.state.maxValue)) ?
(this.props.defaultCurrency.id === 1 ? fixNumber(Number(handleValidation(value, tableMeta)), 1) : fixNumber(Number(handleValidation(value, tableMeta)), 12) >= Number(this.state.minValue) && this.props.defaultCurrency.id === 1 ? fixNumber(Number(handleValidation(value, tableMeta)), 1) : fixNumber(Number(handleValidation(value, tableMeta)), 12) <= Number(this.state.maxValue)) ?
// (fixNumber(Number(handleValidation(value, tableMeta)), 12) >= Number(this.state.minValue) && fixNumber(Number(handleValidation(value, tableMeta)), 12) <= Number(this.state.maxValue)) ?
<NumberFormat
thousandSeparator={true}
style={{
......@@ -2485,7 +2491,8 @@ export default class BalanceSheet extends Component {
null
:
tableMeta.rowData[0] === 7 ?
(fixNumber(Number(handleValidation(value, tableMeta)), 1) >= Number(this.state.minValue) && fixNumber(Number(handleValidation(value, tableMeta)), 1) <= Number(this.state.maxValue)) ?
(this.props.defaultCurrency.id === 1 ? fixNumber(Number(handleValidation(value, tableMeta)), 1) : fixNumber(Number(handleValidation(value, tableMeta)), 12) >= Number(this.state.minValue) && this.props.defaultCurrency.id === 1 ? fixNumber(Number(handleValidation(value, tableMeta)), 1) : fixNumber(Number(handleValidation(value, tableMeta)), 12) <= Number(this.state.maxValue)) ?
// (fixNumber(Number(handleValidation(value, tableMeta)), 12) >= Number(this.state.minValue) && fixNumber(Number(handleValidation(value, tableMeta)), 12) <= Number(this.state.maxValue)) ?
<NumberFormat
thousandSeparator={true}
style={{
......@@ -2672,7 +2679,8 @@ export default class BalanceSheet extends Component {
null
:
tableMeta.rowData[0] === 7 ?
(fixNumber(Number(handleValidation(value, tableMeta)), 1) >= Number(this.state.minValue) && fixNumber(Number(handleValidation(value, tableMeta)), 1) <= Number(this.state.maxValue)) ?
(this.props.defaultCurrency.id === 1 ? fixNumber(Number(handleValidation(value, tableMeta)), 1) : fixNumber(Number(handleValidation(value, tableMeta)), 12) >= Number(this.state.minValue) && this.props.defaultCurrency.id === 1 ? fixNumber(Number(handleValidation(value, tableMeta)), 1) : fixNumber(Number(handleValidation(value, tableMeta)), 12) <= Number(this.state.maxValue)) ?
// (fixNumber(Number(handleValidation(value, tableMeta)), 12) >= Number(this.state.minValue) && fixNumber(Number(handleValidation(value, tableMeta)), 12) <= Number(this.state.maxValue)) ?
<NumberFormat
thousandSeparator={true}
style={{
......@@ -2859,7 +2867,8 @@ export default class BalanceSheet extends Component {
null
:
tableMeta.rowData[0] === 7 ?
(fixNumber(Number(handleValidation(value, tableMeta)), 1) >= Number(this.state.minValue) && fixNumber(Number(handleValidation(value, tableMeta)), 1) <= Number(this.state.maxValue)) ?
(this.props.defaultCurrency.id === 1 ? fixNumber(Number(handleValidation(value, tableMeta)), 1) : fixNumber(Number(handleValidation(value, tableMeta)), 12) >= Number(this.state.minValue) && this.props.defaultCurrency.id === 1 ? fixNumber(Number(handleValidation(value, tableMeta)), 1) : fixNumber(Number(handleValidation(value, tableMeta)), 12) <= Number(this.state.maxValue)) ?
// (fixNumber(Number(handleValidation(value, tableMeta)), 12) >= Number(this.state.minValue) && fixNumber(Number(handleValidation(value, tableMeta)), 12) <= Number(this.state.maxValue)) ?
<NumberFormat
thousandSeparator={true}
style={{
......@@ -3046,7 +3055,8 @@ export default class BalanceSheet extends Component {
null
:
tableMeta.rowData[0] === 7 ?
(fixNumber(Number(handleValidation(value, tableMeta)), 1) >= Number(this.state.minValue) && fixNumber(Number(handleValidation(value, tableMeta)), 1) <= Number(this.state.maxValue)) ?
(this.props.defaultCurrency.id === 1 ? fixNumber(Number(handleValidation(value, tableMeta)), 1) : fixNumber(Number(handleValidation(value, tableMeta)), 12) >= Number(this.state.minValue) && this.props.defaultCurrency.id === 1 ? fixNumber(Number(handleValidation(value, tableMeta)), 1) : fixNumber(Number(handleValidation(value, tableMeta)), 12) <= Number(this.state.maxValue)) ?
// (fixNumber(Number(handleValidation(value, tableMeta)), 12) >= Number(this.state.minValue) && fixNumber(Number(handleValidation(value, tableMeta)), 12) <= Number(this.state.maxValue)) ?
<NumberFormat
thousandSeparator={true}
style={{
......@@ -3233,7 +3243,8 @@ export default class BalanceSheet extends Component {
null
:
tableMeta.rowData[0] === 7 ?
(fixNumber(Number(handleValidation(value, tableMeta)), 1) >= Number(this.state.minValue) && fixNumber(Number(handleValidation(value, tableMeta)), 1) <= Number(this.state.maxValue)) ?
(this.props.defaultCurrency.id === 1 ? fixNumber(Number(handleValidation(value, tableMeta)), 1) : fixNumber(Number(handleValidation(value, tableMeta)), 12) >= Number(this.state.minValue) && this.props.defaultCurrency.id === 1 ? fixNumber(Number(handleValidation(value, tableMeta)), 1) : fixNumber(Number(handleValidation(value, tableMeta)), 12) <= Number(this.state.maxValue)) ?
// (fixNumber(Number(handleValidation(value, tableMeta)), 12) >= Number(this.state.minValue) && fixNumber(Number(handleValidation(value, tableMeta)), 12) <= Number(this.state.maxValue)) ?
<NumberFormat
thousandSeparator={true}
style={{
......@@ -3420,7 +3431,8 @@ export default class BalanceSheet extends Component {
null
:
tableMeta.rowData[0] === 7 ?
(fixNumber(Number(handleValidation(value, tableMeta)), 1) >= Number(this.state.minValue) && fixNumber(Number(handleValidation(value, tableMeta)), 1) <= Number(this.state.maxValue)) ?
(this.props.defaultCurrency.id === 1 ? fixNumber(Number(handleValidation(value, tableMeta)), 1) : fixNumber(Number(handleValidation(value, tableMeta)), 12) >= Number(this.state.minValue) && this.props.defaultCurrency.id === 1 ? fixNumber(Number(handleValidation(value, tableMeta)), 1) : fixNumber(Number(handleValidation(value, tableMeta)), 12) <= Number(this.state.maxValue)) ?
// (fixNumber(Number(handleValidation(value, tableMeta)), 12) >= Number(this.state.minValue) && fixNumber(Number(handleValidation(value, tableMeta)), 12) <= Number(this.state.maxValue)) ?
<NumberFormat
thousandSeparator={true}
style={{
......@@ -3607,7 +3619,8 @@ export default class BalanceSheet extends Component {
null
:
tableMeta.rowData[0] === 7 ?
(fixNumber(Number(handleValidation(value, tableMeta)), 1) >= Number(this.state.minValue) && fixNumber(Number(handleValidation(value, tableMeta)), 1) <= Number(this.state.maxValue)) ?
(this.props.defaultCurrency.id === 1 ? fixNumber(Number(handleValidation(value, tableMeta)), 1) : fixNumber(Number(handleValidation(value, tableMeta)), 12) >= Number(this.state.minValue) && this.props.defaultCurrency.id === 1 ? fixNumber(Number(handleValidation(value, tableMeta)), 1) : fixNumber(Number(handleValidation(value, tableMeta)), 12) <= Number(this.state.maxValue)) ?
// (fixNumber(Number(handleValidation(value, tableMeta)), 12) >= Number(this.state.minValue) && fixNumber(Number(handleValidation(value, tableMeta)), 12) <= Number(this.state.maxValue)) ?
<NumberFormat
thousandSeparator={true}
style={{
......@@ -3794,7 +3807,8 @@ export default class BalanceSheet extends Component {
null
:
tableMeta.rowData[0] === 7 ?
(fixNumber(Number(handleValidation(value, tableMeta)), 1) >= Number(this.state.minValue) && fixNumber(Number(handleValidation(value, tableMeta)), 1) <= Number(this.state.maxValue)) ?
(this.props.defaultCurrency.id === 1 ? fixNumber(Number(handleValidation(value, tableMeta)), 1) : fixNumber(Number(handleValidation(value, tableMeta)), 12) >= Number(this.state.minValue) && this.props.defaultCurrency.id === 1 ? fixNumber(Number(handleValidation(value, tableMeta)), 1) : fixNumber(Number(handleValidation(value, tableMeta)), 12) <= Number(this.state.maxValue)) ?
// (fixNumber(Number(handleValidation(value, tableMeta)), 12) >= Number(this.state.minValue) && fixNumber(Number(handleValidation(value, tableMeta)), 12) <= Number(this.state.maxValue)) ?
<NumberFormat
thousandSeparator={true}
style={{
......
......@@ -552,6 +552,7 @@ export default class BudgetTahunan extends Component {
options: periodeData,
getOptionLabel: (option) => option.periode,
};
// 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 index = data.sort((a, b) => a - b).findIndex((val) => val === periode)
// // console.log(this.props.location.state.rawData)
......@@ -3055,7 +3056,7 @@ export default class BudgetTahunan extends Component {
disabled={this.state.listCompany === null ? true : this.state.intent === 'Home' ? true : false}
onChange={(event, newInputValue) => this.setState({ company: newInputValue }, () => {
this.setState({ visibleTableHistory: false })
// this.getLastPeriod()
this.getLastPeriod()
this.getCurrency(newInputValue.company_id)
this.getRevision()
})}
......
......@@ -175,7 +175,7 @@ export default class CorporateAnnualTarget extends Component {
item.level,
"",
item.description,
item.type_report_id == 1 ? `${Number(item.weight) * 100}%` : (String(item.cat.weight).includes('%') ? (String(Number(String(item.cat.weight).substr(0, String(item.cat.weight).length - 1))) + '%') : ((String(Number(item.cat.weight)) + '%') + '%')),
item.type_report_id == 1 ? `${fixNumber(Number(item.weight) * 100)}%` : (String(item.cat.weight).includes('%') ? (String(Number(String(item.cat.weight).substr(0, String(item.cat.weight).length - 1))) + '%') : ((String(Number(item.cat.weight)) + '%') + '%')),
parentTrue ? item.cat.uom : item.uom,
parentTrue ? item.cat.kpi_type == "" ? null : { value: item.cat.kpi_type } : item.kpi_type == "" ? null : { value: item.kpi_type },
parentTrue ? item.cat.max_ach == "" ? null : { value: titleCase(item.cat.max_ach) } : item.max_ach == "" ? null : { value: titleCase(item.max_ach) },
......@@ -219,7 +219,7 @@ export default class CorporateAnnualTarget extends Component {
item.level,
"",
item.description,
item.type_report_id == 1 ? (`${String(item.weight).includes('%') ? String(item.weight) : String((Number(item.weight) * 100) + '% ')}`) : (String(Number(String(item.cat.weight).substr(0, String(item.cat.weight).length - 1))) + '%'),
item.type_report_id == 1 ? (`${String(item.weight).includes('%') ? String(item.weight) : String(fixNumber((Number(item.weight) * 100)) + '% ')}`) : (String(Number(String(item.cat.weight).substr(0, String(item.cat.weight).length - 1))) + '%'),
item.cat.uom,
item.kpi_type == "" ? null : { value: item.kpi_type },
item.max_ach == "" ? null : { value: titleCase(item.max_ach) },
......
......@@ -166,6 +166,9 @@ class MaintenanceMode extends Component {
}
handleCreate() {
let bodyInactive = '<p><span style="font-size: 15px"><span style="color: rgb(0, 0, 0)">Hi,</span></span></p><p><span style="font-size: 15px"><span style="color: rgb(0, 0, 0)">We’re happy to let you know that TIA 4.0 is back online!</span></span></p><p><span style="font-size: 15px"><span style="color: rgb(0, 0, 0)">We appreciate your patience and kind understanding.</span></span></p><p><span style="font-size: 15px"><span style="color: rgb(0, 0, 0)">Thank you!</span></span></p><p><span style="font-size: 15px"><span style="color: rgb(0, 0, 0)">&nbsp;</span></span></p><p><span style="font-size: 15px"><span style="color: rgb(0, 0, 0)">Regards,</span></span></p><p><span style="font-size: 15px"><span style="color: rgb(0, 0, 0)">&nbsp;</span></span></p><p><span style="font-size: 15px"><span style="color: rgb(0, 0, 0)"><strong><span style="font-size: 13px"><span style="color: rgb(0, 32, 96)">Triputra Group</span></span></strong></span></span></p><p><span style="font-size: 15px"><span style="color: rgb(0, 0, 0)"><strong>&nbsp;</strong></span></span></p><div class="se-component se-image-container __se__float-" contenteditable="false"><figure style="margin: 0px; width: 288px;"><img alt="" src="https://ci3.googleusercontent.com/proxy/pZlDMYsSIvwgrUzQ7hPn1nrk26YNIJbCPH_G8X56UqyPfO3tJ2BX1RFFZ7tTlXkJa7ccfzn7CVm6zWmbgFyhVkvTBjAAHzaAo3sllX9kkd9aQnnk=s0-d-e1-ft#https://www.triputra-group.com/mt-content/uploads/images/logo.png" data-origin="288,64" data-proportion="true" data-size="288px,64px" data-align="" data-file-name="logo.png" data-file-size="0" origin-size="288,64" style="width: 288px; height: 64px;" data-index="0"></figure></div><p><span style="font-size: 15px"><span style="color: rgb(0, 0, 0)">&nbsp;</span></span></p><p><span style="font-size: 15px"><span style="color: rgb(0, 0, 0)"><strong>Menara Kadin Indonesia, 23<sup>rd</sup>&nbsp;Floor</strong></span></span></p><p><span style="font-size: 15px"><span style="color: rgb(0, 0, 0)"><strong>Jl. HR Rasuna Said Blok X-5, Kav 2-3, Kuningan, Jakarta Selatan 12950</strong></span></span></p><p><span style="font-size: 15px"><span style="color: rgb(0, 0, 0)"><strong>Ph&nbsp;<a href="callto:+62%2021%205274323" target="_blank">+62 21 5274323</a>;&nbsp;<a href="http://www.triputra-group.com/" target="_blank" class="on">www.triputra-group.com</a></strong></span></span></p>'
let bodyActive = '<p><span style="font-size: 15px"><span style="color: rgb(0, 0, 0)">Hi,</span></span></p><p><span style="font-size: 15px"><span style="color: rgb(0, 0, 0)"><span style="font-size: 29px">TIA 4.0 is down for maintenance!</span></span></span></p><p><span style="font-size: 15px"><span style="color: rgb(0, 0, 0)">Thank you for your patience, we expect to be back shortly.</span></span></p><p><span style="font-size: 15px"><span style="color: rgb(0, 0, 0)">&nbsp;</span></span></p><p><span style="font-size: 15px"><span style="color: rgb(0, 0, 0)">We apologize for any inconvenience.</span></span></p><p><span style="font-size: 15px"><span style="color: rgb(0, 0, 0)">For more information, please contact our email:&nbsp;<span style="color: rgb(0, 90, 149)"><a href="mailto:tia4.0@triputra-group.com" target="_blank">tia4.0@triputra-group.com</a></span>.</span></span></p><p><span style="font-size: 15px"><span style="color: rgb(0, 0, 0)">&nbsp;</span></span></p><p><span style="font-size: 15px"><span style="color: rgb(0, 0, 0)">Regards,</span></span></p><p><span style="font-size: 15px"><span style="color: rgb(0, 0, 0)">&nbsp;</span></span></p><p><span style="font-size: 15px"><span style="color: rgb(0, 0, 0)"><strong><span style="font-size: 13px"><span style="color: rgb(0, 32, 96)">Triputra Group</span></span></strong></span></span></p><div class="se-component se-image-container __se__float-" contenteditable="false"><figure style="margin: 0px; width: 288px;"><img alt="" src="https://www.triputra-group.com/mt-content/uploads/images/logo.png" data-origin="288,64" data-proportion="true" data-size="288px,64px" data-align="" data-file-name="logo.png" data-file-size="0" origin-size="288,64" style="width: 288px; height: 64px;" data-index="0"></figure></div><p><span style="font-size: 15px"><span style="color: rgb(0, 0, 0)">&nbsp;</span></span></p><p><span style="font-size: 15px"><span style="color: rgb(0, 0, 0)"><strong>Menara Kadin Indonesia, 23<sup>rd</sup>&nbsp;Floor</strong></span></span></p><p><span style="font-size: 15px"><span style="color: rgb(0, 0, 0)"><strong>Jl. HR Rasuna Said Blok X-5, Kav 2-3, Kuningan, Jakarta Selatan 12950</strong></span></span></p><p><span style="font-size: 15px"><span style="color: rgb(0, 0, 0)"><strong>Ph&nbsp;<a href="callto:+62 21 5274323">+62 21 5274323</a>;&nbsp;<a href="http://www.triputra-group.com/" target="_blank">www.triputra-group.com</a></strong></span></span></p>'
let payload = {
"maintenance_headline": this.state.headline,
"maintenance_content": this.state.maintenanceContent,
......@@ -174,13 +177,13 @@ class MaintenanceMode extends Component {
{
"mail_type": "MAINTENANCE_MODE_ACTIVE",
"mail_subject": "TIA 4.0 Is Under Maintenance",
"mail_body": "",
"mail_body": bodyActive,
"mail_status": 0
},
{
"mail_type": "MAINTENANCE_MODE_INACTIVE",
"mail_subject": "TIA 4.0 is Back",
"mail_body": "",
"mail_body": bodyInactive,
"mail_status": 1
}
]
......@@ -230,39 +233,42 @@ class MaintenanceMode extends Component {
}
handleEdit() {
let bodyInactive = '<p><span style="font-size: 15px"><span style="color: rgb(0, 0, 0)">Hi,</span></span></p><p><span style="font-size: 15px"><span style="color: rgb(0, 0, 0)">We’re happy to let you know that TIA 4.0 is back online!</span></span></p><p><span style="font-size: 15px"><span style="color: rgb(0, 0, 0)">We appreciate your patience and kind understanding.</span></span></p><p><span style="font-size: 15px"><span style="color: rgb(0, 0, 0)">Thank you!</span></span></p><p><span style="font-size: 15px"><span style="color: rgb(0, 0, 0)">&nbsp;</span></span></p><p><span style="font-size: 15px"><span style="color: rgb(0, 0, 0)">Regards,</span></span></p><p><span style="font-size: 15px"><span style="color: rgb(0, 0, 0)">&nbsp;</span></span></p><p><span style="font-size: 15px"><span style="color: rgb(0, 0, 0)"><strong><span style="font-size: 13px"><span style="color: rgb(0, 32, 96)">Triputra Group</span></span></strong></span></span></p><p><span style="font-size: 15px"><span style="color: rgb(0, 0, 0)"><strong>&nbsp;</strong></span></span></p><div class="se-component se-image-container __se__float-" contenteditable="false"><figure style="margin: 0px; width: 288px;"><img alt="" src="https://ci3.googleusercontent.com/proxy/pZlDMYsSIvwgrUzQ7hPn1nrk26YNIJbCPH_G8X56UqyPfO3tJ2BX1RFFZ7tTlXkJa7ccfzn7CVm6zWmbgFyhVkvTBjAAHzaAo3sllX9kkd9aQnnk=s0-d-e1-ft#https://www.triputra-group.com/mt-content/uploads/images/logo.png" data-origin="288,64" data-proportion="true" data-size="288px,64px" data-align="" data-file-name="logo.png" data-file-size="0" origin-size="288,64" style="width: 288px; height: 64px;" data-index="0"></figure></div><p><span style="font-size: 15px"><span style="color: rgb(0, 0, 0)">&nbsp;</span></span></p><p><span style="font-size: 15px"><span style="color: rgb(0, 0, 0)"><strong>Menara Kadin Indonesia, 23<sup>rd</sup>&nbsp;Floor</strong></span></span></p><p><span style="font-size: 15px"><span style="color: rgb(0, 0, 0)"><strong>Jl. HR Rasuna Said Blok X-5, Kav 2-3, Kuningan, Jakarta Selatan 12950</strong></span></span></p><p><span style="font-size: 15px"><span style="color: rgb(0, 0, 0)"><strong>Ph&nbsp;<a href="callto:+62%2021%205274323" target="_blank">+62 21 5274323</a>;&nbsp;<a href="http://www.triputra-group.com/" target="_blank" class="on">www.triputra-group.com</a></strong></span></span></p>'
let bodyActive = '<p><span style="font-size: 15px"><span style="color: rgb(0, 0, 0)">Hi,</span></span></p><p><span style="font-size: 15px"><span style="color: rgb(0, 0, 0)"><span style="font-size: 29px">TIA 4.0 is down for maintenance!</span></span></span></p><p><span style="font-size: 15px"><span style="color: rgb(0, 0, 0)">Thank you for your patience, we expect to be back shortly.</span></span></p><p><span style="font-size: 15px"><span style="color: rgb(0, 0, 0)">&nbsp;</span></span></p><p><span style="font-size: 15px"><span style="color: rgb(0, 0, 0)">We apologize for any inconvenience.</span></span></p><p><span style="font-size: 15px"><span style="color: rgb(0, 0, 0)">For more information, please contact our email:&nbsp;<span style="color: rgb(0, 90, 149)"><a href="mailto:tia4.0@triputra-group.com" target="_blank">tia4.0@triputra-group.com</a></span>.</span></span></p><p><span style="font-size: 15px"><span style="color: rgb(0, 0, 0)">&nbsp;</span></span></p><p><span style="font-size: 15px"><span style="color: rgb(0, 0, 0)">Regards,</span></span></p><p><span style="font-size: 15px"><span style="color: rgb(0, 0, 0)">&nbsp;</span></span></p><p><span style="font-size: 15px"><span style="color: rgb(0, 0, 0)"><strong><span style="font-size: 13px"><span style="color: rgb(0, 32, 96)">Triputra Group</span></span></strong></span></span></p><div class="se-component se-image-container __se__float-" contenteditable="false"><figure style="margin: 0px; width: 288px;"><img alt="" src="https://www.triputra-group.com/mt-content/uploads/images/logo.png" data-origin="288,64" data-proportion="true" data-size="288px,64px" data-align="" data-file-name="logo.png" data-file-size="0" origin-size="288,64" style="width: 288px; height: 64px;" data-index="0"></figure></div><p><span style="font-size: 15px"><span style="color: rgb(0, 0, 0)">&nbsp;</span></span></p><p><span style="font-size: 15px"><span style="color: rgb(0, 0, 0)"><strong>Menara Kadin Indonesia, 23<sup>rd</sup>&nbsp;Floor</strong></span></span></p><p><span style="font-size: 15px"><span style="color: rgb(0, 0, 0)"><strong>Jl. HR Rasuna Said Blok X-5, Kav 2-3, Kuningan, Jakarta Selatan 12950</strong></span></span></p><p><span style="font-size: 15px"><span style="color: rgb(0, 0, 0)"><strong>Ph&nbsp;<a href="callto:+62 21 5274323">+62 21 5274323</a>;&nbsp;<a href="http://www.triputra-group.com/" target="_blank">www.triputra-group.com</a></strong></span></span></p>'
let payload = {
"maintenance_id": this.state.maintenanceID,
"maintenance_headline": this.state.headline,
"maintenance_content": this.state.maintenanceContent,
"maintenance_status": this.state.maintenanceStatus,
// "maintenance_mail": [
// {
// "mail_type": "MAINTENANCE_MODE_ACTIVE",
// "mail_subject": "TIA 4.0 Is Under Maintenance",
// "mail_body": "",
// "mail_status": 0
// },
// {
// "mail_type": "MAINTENANCE_MODE_INACTIVE",
// "mail_subject": "TIA 4.0 is Back",
// "mail_body": "",
// "mail_status": 1
// }
// ]
"maintenance_mail": [
{
"mail_type": "MAINTENANCE_MODE_ACTIVE",
"mail_subject": this.state.subjectMailActive,
"mail_body": this.state.mailcontentModeActive,
"mail_status": this.state.mailStatusActive
"mail_subject": "TIA 4.0 Is Under Maintenance",
"mail_body": bodyActive,
"mail_status": 0
},
{
"mail_type": "MAINTENANCE_MODE_INACTIVE",
"mail_subject": this.state.subjectMailNonActive,
"mail_body": this.state.mailcontentModeNonActive,
"mail_status": this.state.mailStatusNonActive
"mail_subject": "TIA 4.0 is Back",
"mail_body": bodyInactive,
"mail_status": 1
}
]
// "maintenance_mail": [
// {
// "mail_type": "MAINTENANCE_MODE_ACTIVE",
// "mail_subject": this.state.subjectMailActive,
// "mail_body": this.state.mailcontentModeActive,
// "mail_status": this.state.mailStatusActive
// },
// {
// "mail_type": "MAINTENANCE_MODE_INACTIVE",
// "mail_subject": this.state.subjectMailNonActive,
// "mail_body": this.state.mailcontentModeNonActive,
// "mail_status": this.state.mailStatusNonActive
// }
// ]
}
console.log(payload);
api.create().updateMaintenanceMode(payload).then((response) => {
......@@ -846,4 +852,4 @@ class MaintenanceMode extends Component {
}
}
export default MaintenanceMode;
export default MaintenanceMode;
\ No newline at end of file
......@@ -483,7 +483,7 @@ export default class BalanceSheetOLPA extends Component {
this.setState({ buttonError: true, errorPreview: true, editable: true })
}
})
console.log(this.state.dataTable);
// console.log(this.state.dataTable);
})
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false }, () => {
......@@ -552,6 +552,7 @@ export default class BalanceSheetOLPA extends Component {
balance_sheet: data,
status: type
}
console.log(body);
// console.log(JSON.stringify(body));
api.create('UPLOAD').uploadOLPA(body).then(response => {
console.log(response);
......@@ -628,13 +629,13 @@ export default class BalanceSheetOLPA extends Component {
// console.log(Number(i[18].value).toFixed(1))
// console.log(Number(i[19]).toFixed(1))
if ((this.props.defaultCurrency.id == 1 ? fixNumber(Number(i[17].value), 1) : Number(i[17].value) < Number(this.state.minValue)) || (this.props.defaultCurrency.id == 1 ? fixNumber(Number(i[17].value), 1) : Number(i[17].value) > Number(this.state.maxValue))) {
if (this.props.defaultCurrency.id == 1 ? (fixNumber(Number(i[17].value), 1) < Number(this.state.minValue)) : (Number(i[17].value) < Number(this.state.minValue)) || this.props.defaultCurrency.id == 1 ? (fixNumber(Number(i[17].value), 1) > Number(this.state.maxValue)) : (Number(i[17].value) > Number(this.state.maxValue))) {
console.log("masuk selisih control 1")
err = true
} else if ((this.props.defaultCurrency.id == 1 ? fixNumber(Number(i[18].value), 1) : Number(i[18].value) < Number(this.state.minValue)) || (this.props.defaultCurrency.id == 1 ? fixNumber(Number(i[18].value), 1) : Number(i[18].value) > Number(this.state.maxValue))) {
} else if (this.props.defaultCurrency.id == 1 ? (fixNumber(Number(i[18].value), 1) < Number(this.state.minValue)) : (Number(i[18].value) < Number(this.state.minValue)) || this.props.defaultCurrency.id == 1 ? (fixNumber(Number(i[18].value), 1) > Number(this.state.maxValue)) : (Number(i[18].value) > Number(this.state.maxValue))) {
console.log("masuk selisih control 2")
err = true
} else if ((this.props.defaultCurrency.id == 1 ? fixNumber(Number(i[19]), 1) : Number(i[19]) < Number(this.state.minValue)) || (this.props.defaultCurrency.id == 1 ? fixNumber(Number(i[19]), 1) : Number(i[19]) > Number(this.state.maxValue))) {
} else if (this.props.defaultCurrency.id == 1 ? (fixNumber(Number(i[19]), 1) < Number(this.state.minValue)) : (Number(i[19]) < Number(this.state.minValue)) || this.props.defaultCurrency.id == 1 ? (fixNumber(Number(i[19]), 1) > Number(this.state.maxValue)) : (Number(i[19]) > Number(this.state.maxValue))) {
console.log("masuk selisih control 3")
err = true
}
......@@ -658,7 +659,7 @@ export default class BalanceSheetOLPA extends Component {
total_current_year: i[0] === 3 && i[19] === "" ? "0.0" : String(Number(i[19])),
})
})
console.log(JSON.stringify(data))
// console.log(JSON.stringify(data))
let payload = {
"outlook_pa_id": this.props.outlook_pa_id,
"company_id": this.props.company.company_id,
......@@ -669,26 +670,26 @@ export default class BalanceSheetOLPA extends Component {
"status": "submitted"
}
api.create().validateSubmitReportOLPA(payload).then((response) => {
// console.log(response)
console.log(response)
// console.log(response.data.data.result)
// console.log(err);
console.log(err);
if (response.data) {
if (response.data.status === "success") {
if (response.data.data.result && err === false) {
this.setState({ loading: false, buttonError: false, editable: false, saveDraft: false })
if (kansas == 0) {
this.setState({ kansas: 1, loading: true }, () => {
this.handleValidate()
})
// this.setState({ kansas: 1, loading: true }, () => {
// this.handleValidate()
// })
} else {
this.setState({ kansas: 0 })
}
} else {
this.setState({ loading: false, buttonError: true, editable: true, saveDraft: true })
if (kansas == 0) {
this.setState({ kansas: 1, loading: true }, () => {
this.handleValidate()
})
// this.setState({ kansas: 1, loading: true }, () => {
// this.handleValidate()
// })
} else {
this.setState({ kansas: 0 })
}
......@@ -2455,4 +2456,4 @@ export default class BalanceSheetOLPA extends Component {
</div>
)
}
}
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -4344,6 +4344,8 @@ export default class SubHolding extends Component {
onChange={(event, newInputValue) => this.setState({ company: newInputValue, loading: true, previewTable: false }, () => {
this.getReportType()
this.getCurrency(newInputValue.company_id)
let bizpar = this.state.usdBefore2024 == false && defaultCurrencyID == 2 && newInputValue.id == 1 ? defaultReport.filter(e => e.report === 2) : defaultReport
this.setState({ report: bizpar[0], reportType: bizpar })
})}
disableClearable
style={{ width: 250 }}
......
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