Commit 67b55a1c authored by rifkaki's avatar rifkaki

Merge branch 'master' of http://103.44.149.204/d.arizona/tia-dev into rifka

parents bff404b6 36120d81
...@@ -966,22 +966,22 @@ export default class BalanceSheet extends Component { ...@@ -966,22 +966,22 @@ export default class BalanceSheet extends Component {
tableMeta.rowData[0] === 6 ? tableMeta.rowData[0] === 6 ?
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: String(tableMeta.rowData[5]).toLocaleLowerCase() == "r/e (cummulative)" ? '#5198ea' : 'black', fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={this.props.isApprover == true ? true : ((this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : (String(tableMeta.rowData[5]).toLocaleLowerCase() == "r/e (cummulative)" ? false : true))}
value={Number(handleValueFormula(value, tableMeta)).toFixed(1)} value={String(tableMeta.rowData[5]).toLocaleLowerCase() == "r/e (cummulative)" ? Number(value.value).toFixed(1) : Number(handleValueFormula(value, tableMeta)).toFixed(1)}
/> />
: :
tableMeta.rowData[0] === 5 ? tableMeta.rowData[0] === 5 ?
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: String(tableMeta.rowData[5]).toLocaleLowerCase() == "r/e (cummulative)" ? '#5198ea' : 'black', fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={this.props.isApprover == true ? true : ((this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : (String(tableMeta.rowData[5]).toLocaleLowerCase() == "r/e (cummulative)" ? false : true))}
value={Number(handleValueFormula(value, tableMeta)).toFixed(1)} value={String(tableMeta.rowData[5]).toLocaleLowerCase() == "r/e (cummulative)" ? Number(value.value).toFixed(1) : Number(handleValueFormula(value, tableMeta)).toFixed(1)}
/> />
: :
tableMeta.rowData[0] === 1 ? tableMeta.rowData[0] === 1 ?
null null
......
...@@ -1403,9 +1403,11 @@ export default class ListOfCreditFacilities extends Component { ...@@ -1403,9 +1403,11 @@ export default class ListOfCreditFacilities extends Component {
let indexNyasar = false let indexNyasar = false
let totalLoan = 0 let totalLoan = 0
const formatSeparator = (num) => { // const formatSeparator = (num) => {
return String(num).replace(/(?<!\..*)(\d)(?=(?:\d{3})+(?:\.|$))/g, '$1,') // return String(num).replace(/(?<!\..*)(\d)(?=(?:\d{3})+(?:\.|$))/g, '$1,')
}
// return num
// }
const handleAction = (typeReport, tableMeta, typeButton) => { const handleAction = (typeReport, tableMeta, typeButton) => {
// console.log(typeReport) // console.log(typeReport)
...@@ -3883,7 +3885,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -3883,7 +3885,7 @@ export default class ListOfCreditFacilities extends Component {
<Typography style={{ fontSize: '12px', color: '#4b4b4b' }}>Total Outstanding Loan</Typography> <Typography style={{ fontSize: '12px', color: '#4b4b4b' }}>Total Outstanding Loan</Typography>
</div> </div>
<div style={{border: '1px solid black', padding: 5, minWidth: 200, display: 'flex', justifyContent: 'flex-end'}}> <div style={{border: '1px solid black', padding: 5, minWidth: 200, display: 'flex', justifyContent: 'flex-end'}}>
<Typography style={{ fontSize: '14px', color: '#4b4b4b' }}>{formatSeparator(this.state.perBS)}</Typography> <Typography style={{ fontSize: '14px', color: '#4b4b4b' }}><NumberFormat value={this.state.perBS} displayType={'text'} thousandSeparator={true} prefix={''}/></Typography>
</div> </div>
</div> </div>
</div> </div>
...@@ -3896,7 +3898,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -3896,7 +3898,7 @@ export default class ListOfCreditFacilities extends Component {
<Typography style={{ fontSize: '12px', color: '#4b4b4b' }}>Diff</Typography> <Typography style={{ fontSize: '12px', color: '#4b4b4b' }}>Diff</Typography>
</div> </div>
<div style={{borderStyle: 'solid', borderWidth: '0px 1px 1px 1px', padding: 5, minWidth: 200, display: 'flex', justifyContent: 'flex-end'}}> <div style={{borderStyle: 'solid', borderWidth: '0px 1px 1px 1px', padding: 5, minWidth: 200, display: 'flex', justifyContent: 'flex-end'}}>
<Typography style={{ fontSize: '14px', color: Number(this.state.diff) > 0? 'red' :'#4b4b4b' }}>{formatSeparator(this.state.diff)}</Typography> <Typography style={{ fontSize: '14px', color: Number(this.state.diff) > 0? 'red' :'#4b4b4b' }}><NumberFormat value={this.state.diff} displayType={'text'} thousandSeparator={true} prefix={''}/></Typography>
</div> </div>
</div> </div>
</div> </div>
...@@ -4095,7 +4097,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -4095,7 +4097,7 @@ export default class ListOfCreditFacilities extends Component {
<Typography style={{ fontSize: '12px', color: '#4b4b4b' }}>Total Outstanding Loan</Typography> <Typography style={{ fontSize: '12px', color: '#4b4b4b' }}>Total Outstanding Loan</Typography>
</div> </div>
<div style={{border: '1px solid black', padding: 5, minWidth: 200, display: 'flex', justifyContent: 'flex-end'}}> <div style={{border: '1px solid black', padding: 5, minWidth: 200, display: 'flex', justifyContent: 'flex-end'}}>
<Typography style={{ fontSize: '14px', color: '#4b4b4b' }}>{formatSeparator(this.state.perBS)}</Typography> <Typography style={{ fontSize: '14px', color: '#4b4b4b' }}><NumberFormat value={this.state.perBS} displayType={'text'} thousandSeparator={true} prefix={''}/></Typography>
</div> </div>
</div> </div>
</div> </div>
...@@ -4108,7 +4110,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -4108,7 +4110,7 @@ export default class ListOfCreditFacilities extends Component {
<Typography style={{ fontSize: '12px', color: '#4b4b4b' }}>Diff</Typography> <Typography style={{ fontSize: '12px', color: '#4b4b4b' }}>Diff</Typography>
</div> </div>
<div style={{borderStyle: 'solid', borderWidth: '0px 1px 1px 1px', padding: 5, minWidth: 200, display: 'flex', justifyContent: 'flex-end'}}> <div style={{borderStyle: 'solid', borderWidth: '0px 1px 1px 1px', padding: 5, minWidth: 200, display: 'flex', justifyContent: 'flex-end'}}>
<Typography style={{ fontSize: '14px', color: Number(this.state.diff) > 0? 'red' :'#4b4b4b' }}>{formatSeparator(this.state.diff)}</Typography> <Typography style={{ fontSize: '14px', color: Number(this.state.diff) > 0? 'red' :'#4b4b4b' }}><NumberFormat value={this.state.diff} displayType={'text'} thousandSeparator={true} prefix={''}/></Typography>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -144,6 +144,7 @@ export default class Profile extends Component { ...@@ -144,6 +144,7 @@ export default class Profile extends Component {
// const re = /^(?=.*[0-9])(?=.*[a-zA-Z])([a-zA-Z0-9]+)$/; // const re = /^(?=.*[0-9])(?=.*[a-zA-Z])([a-zA-Z0-9]+)$/;
const re = /^(?=.*[A-Za-z])(?=.*\d)(?=.*[@$!%*#?&])[A-Za-z\d@$!%*#?&]{1,}$/; const re = /^(?=.*[A-Za-z])(?=.*\d)(?=.*[@$!%*#?&])[A-Za-z\d@$!%*#?&]{1,}$/;
return re.test(String(value)); return re.test(String(value));
// return(value)
} }
isEmail(email) { isEmail(email) {
......
...@@ -59,6 +59,7 @@ class ResetPassword extends Component { ...@@ -59,6 +59,7 @@ class ResetPassword extends Component {
// const re = /^(?=.*[0-9])(?=.*[a-zA-Z])([a-zA-Z0-9]+)$/; // const re = /^(?=.*[0-9])(?=.*[a-zA-Z])([a-zA-Z0-9]+)$/;
const re = /^(?=.*[A-Za-z])(?=.*\d)(?=.*[@$!%*#?&])[A-Za-z\d@$!%*#?&]{1,}$/; const re = /^(?=.*[A-Za-z])(?=.*\d)(?=.*[@$!%*#?&])[A-Za-z\d@$!%*#?&]{1,}$/;
return re.test(String(value)); return re.test(String(value));
// return value
} }
isEmail(email) { isEmail(email) {
......
...@@ -59,6 +59,7 @@ class SetPassword extends Component { ...@@ -59,6 +59,7 @@ class SetPassword extends Component {
// const re = /^(?=.*[0-9])(?=.*[a-zA-Z])([a-zA-Z0-9]+)$/; // const re = /^(?=.*[0-9])(?=.*[a-zA-Z])([a-zA-Z0-9]+)$/;
const re = /^(?=.*[A-Za-z])(?=.*\d)(?=.*[@$!%*#?&])[A-Za-z\d@$!%*#?&]{1,}$/; const re = /^(?=.*[A-Za-z])(?=.*\d)(?=.*[@$!%*#?&])[A-Za-z\d@$!%*#?&]{1,}$/;
return re.test(String(value)); return re.test(String(value));
// return value
} }
isEmail(email) { isEmail(email) {
......
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