Skip to content

Commit

Permalink
attributes styling
Browse files Browse the repository at this point in the history
  • Loading branch information
rodaynahassan committed May 4, 2019
1 parent f4f196f commit 2c46597
Show file tree
Hide file tree
Showing 6 changed files with 219 additions and 11 deletions.
42 changes: 40 additions & 2 deletions client/src/components/pages/ApprovedCompanies.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,26 @@ class ApprovedCompanies extends Component {
key !== "lawyerId" &&
key !== "reviewerId" &&
key !== "__v" &&
key !== "reviewerComments"
key !== "reviewerComments" &&
key !== "lawyerComments" &&
key !== "status" &&
key !== "fees" &&
key !== "investorNationality"

) {
var now=key;
var temp="";
temp=temp+key.charAt(0).toUpperCase();
for(var j=1;j<now.length;j++){
if(now.charCodeAt(j)>=65 && now.charCodeAt(j)<=90){
temp=temp+" "
temp=temp+now.charAt(j)
}
else{
temp=temp+now.charAt(j)
}

}
var constraints = Form[key];
if (Array.isArray(constraints)) {
if(!constraints["0"]) return
Expand All @@ -104,16 +122,36 @@ class ApprovedCompanies extends Component {
keys.push(att);
}
}
if (key==="creationDate"){
var date=constraints.substring(0,10);
return (
<div>
<div key={key}>
<h3>
<i class="fas fa-circle" style={{fontSize:'0.5em'}}/> {temp} :
<span style={{ textAlign: 'center' }} />{' '}
<span style={{ color: '#9ad1e7' }}> {date}{" "}</span>{' '}
</h3>
</div>

</div>
);

}
else{
return (
<div>
<div key={key}>
<h3>
<i class="fas fa-circle" style={{fontSize:'0.5em'}}/> {key} : {constraints}{" "}
<i class="fas fa-circle" style={{fontSize:'0.5em'}}/> {temp} :
<span style={{ textAlign: 'center' }} />{' '}
<span style={{ color: '#9ad1e7' }}> {constraints}{" "}</span>{' '}
</h3>
</div>

</div>
);
}
}})
}
</Card.Body>
Expand Down
49 changes: 46 additions & 3 deletions client/src/components/pages/Companies.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,17 +74,60 @@ class Companies extends Component {
>
<div>
{KEYS.map((key, index) => {
if (key !== '_id' && key !== 'formType' && key !== 'investorId' && key !== 'lawyerId' && key !== 'reviewerId') {
if (
key !== '_id' &&
key !== 'formType' &&
key !== 'investorId' &&
key !== 'lawyerId' &&
key !== 'reviewerId'&&
key !== 'investorNationality'&&
key !== 'reviewerComments' &&
key !== 'lawyerComments' &&
key !== "status" &&
key !== "fees"
)
{
var now=key;
var temp="";
temp=temp+key.charAt(0).toUpperCase();
for(var j=1;j<now.length;j++){
if(now.charCodeAt(j)>=65 && now.charCodeAt(j)<=90){
temp=temp+" "
temp=temp+now.charAt(j)
}
else{
temp=temp+now.charAt(j)
}

}
var constraints = Form[key];
for (var i in constraints) {
if (Array.isArray(constraints)) return constraints.map((att, index) => {});
if (key==="creationDate"){
var date=constraints.substring(0,10);
return (
<div>
<div key={key}>
<h5>
<i class="fas fa-circle" style={{fontSize: '0.5em'}}/> {temp} :
<span style={{ textAlign: 'center' }} />{' '}
<span style={{ color: '#9ad1e7' }}> {date}{" "}</span>{' '}
</h5>
</div>

</div>
);

}
else{
return (
<h5>
<i class="fas fa-circle" style={{ fontSize: '13px' }} /> {key} :{' '}
<i class="fas fa-circle" style={{ fontSize: '0.5em' }} /> {temp} :{' '}
<span style={{ textAlign: 'center' }} />{' '}
<span style={{ color: '#9ad1e7' }}>{constraints}</span>{' '}
</h5>
);
}
}
}
})}
Expand All @@ -110,7 +153,7 @@ class Companies extends Component {
justifyContent: 'flex-end'
}}
>
<h2 style={{ marginTop: '30px', paddingTop: '50px', fontSize: '50px' }}>{trans.title}</h2>
<h2 style={{ marginTop: '30px', paddingTop: '50px', fontSize: '1.5em' }}>{trans.title}</h2>
</div>
<div style={{ display: 'flex', flexWrap: 'wrap', alignItems: 'right', justifyContent: 'right' }}>
{this.getAttributes()}
Expand Down
34 changes: 33 additions & 1 deletion client/src/components/pages/assignToReviewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,19 +108,51 @@ class assignToReviewer extends Component {
<div>
{KEYS.map((key, index) => {
if (key !== '_id' && key !== 'formType' && key !== 'investorId' && key !== 'lawyerId') {
var now=key;
var temp="";
temp=temp+key.charAt(0).toUpperCase();
for(var j=1;j<now.length;j++){
if(now.charCodeAt(j)>=65 && now.charCodeAt(j)<=90){
temp=temp+" "
temp=temp+now.charAt(j)
}
else{
temp=temp+now.charAt(j)
}

}
var constraints = Form[key];
console.log(key, ':', constraints);
for (var i in constraints) {
if (Array.isArray(constraints)) return constraints.map((att, index) => {});
if (key==="creationDate"){
var date=constraints.substring(0,10);
console.log(date)
return (
<div>
<div key={key}>
<h5>
<i class="fas fa-circle" style={{fontSize:'13px'}}/> {temp} :
<span style={{ textAlign: 'center' }} />{' '}
<span style={{ color: '#9ad1e7' }}> {date}{" "}</span>{' '}
</h5>
</div>

</div>
);

}
else{
return (
<h5>
<i class="fas fa-circle" style={{ fontSize: '13px' }} /> {key} :{' '}
<i class="fas fa-circle" style={{ fontSize: '13px' }} /> {temp} :{' '}
<span style={{ textAlign: 'center' }} />{' '}
<span style={{ color: '#9ad1e7' }}>{constraints}</span>{' '}
</h5>
);
}
}
}
})}
</div>
</BackSide>
Expand Down
36 changes: 34 additions & 2 deletions client/src/components/pages/getCaseLawyer.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,19 @@ class Companies extends Component {
key !== 'reviewerId' &&
key !== '__v'
) {
var now=key;
var temp="";
temp=temp+key.charAt(0).toUpperCase();
for(var j=1;j<now.length;j++){
if(now.charCodeAt(j)>=65 && now.charCodeAt(j)<=90){
temp=temp+" "
temp=temp+now.charAt(j)
}
else{
temp=temp+now.charAt(j)
}

}
var constraints = Form[key];
if (Array.isArray(constraints)) {
if (!constraints['0']) return;
Expand All @@ -156,7 +169,7 @@ class Companies extends Component {
<div>
{' '}
<h3>
<i class="fas fa-genderless" />{trans.commentsL}
<i class="fas fa-circle" style={{fontSize:"15px"}} />{trans.commentsL}
</h3>
{keys.map((att, index) => {
return (
Expand Down Expand Up @@ -208,19 +221,38 @@ class Companies extends Component {
);
}
}
if (key==="creationDate"){
var date=constraints.substring(0,10);
console.log(date)
return (
<div>
<div key={key}>
<h3>
<i class="fas fa-circle" style={{fontSize:'0.5em'}}/> {temp} :
<span style={{ textAlign: 'center' }} />{' '}
<span style={{ color: '#9ad1e7' }}> {date}{" "}</span>{' '}
</h3>
</div>

</div>
);

}
else{

return (
<div>
<div key={key}>
<h3>
<i class="fas fa-circle" style={{ fontSize: '0.5em' }} /> {key} :{' '}
<i class="fas fa-circle" style={{ fontSize: '0.5em' }} /> {temp} :{' '}
<span style={{ textAlign: 'center' }} />{' '}
<span style={{ color: '#9ad1e7' }}>{constraints}</span>{' '}
</h3>
</div>
</div>
);
}
}
})}
{/* <MDBProgress material value={35} color="dark" height="35px">
<h3> In progress Lawyer </h3>
Expand Down
35 changes: 33 additions & 2 deletions client/src/components/pages/inProgressInvestorCases.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,19 @@ class InProgressInvestorCases extends Component {
key !== 'reviewerId' &&
key !== '__v'
) {
var now=key;
var temp="";
temp=temp+key.charAt(0).toUpperCase();
for(var j=1;j<now.length;j++){
if(now.charCodeAt(j)>=65 && now.charCodeAt(j)<=90){
temp=temp+" "
temp=temp+now.charAt(j)
}
else{
temp=temp+now.charAt(j)
}

}
var constraints = Form[key];
if (Array.isArray(constraints)) {
if (!constraints['0']) return;
Expand Down Expand Up @@ -292,18 +305,36 @@ class InProgressInvestorCases extends Component {
);
}
}

if (key==="creationDate"){
var date=constraints.substring(0,10);
console.log(date)
return (
<div>
<div key={key}>
<h3>
<i class="fas fa-circle" style={{fontSize:'0.5em'}}/> {temp} :
<span style={{ textAlign: 'center' }} />{' '}
<span style={{ color: '#9ad1e7' }}> {date}{" "}</span>{' '}
</h3>
</div>

</div>
);

}
else{
return (
<div>
<div key={key}>
<h3>
<i class="fas fa-circle" style={{ fontSize: '0.5em' }} /> {key} :{' '}
<i class="fas fa-circle" style={{ fontSize: '0.5em' }} /> {temp} :{' '}
<span style={{ textAlign: 'center' }} />{' '}
<span style={{ color: '#9ad1e7' }}>{constraints}</span>{' '}
</h3>
</div>
</div>
);
}
}
})}
{/* {KEYS.map((key, index) => {
Expand Down
34 changes: 33 additions & 1 deletion client/src/components/pages/unassignedForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,19 +116,51 @@ class unassignedForm extends Component {
key !== 'investorId' &&
key !== 'lawyerId'
) {
var now=key;
var temp="";
temp=temp+key.charAt(0).toUpperCase();
for(var j=1;j<now.length;j++){
if(now.charCodeAt(j)>=65 && now.charCodeAt(j)<=90){
temp=temp+" "
temp=temp+now.charAt(j)
}
else{
temp=temp+now.charAt(j)
}

}
var constraints = Form[key];
console.log(key, ':', constraints);
for (var i in constraints) {
if (Array.isArray(constraints)) return constraints.map((att, index) => {});
if (key==="creationDate"){
var date=constraints.substring(0,10);
console.log(date)
return (
<div>
<div key={key}>
<h5>
<i class="fas fa-circle" style={{fontSize:'13px'}}/> {temp} :
<span style={{ textAlign: 'center' }} />{' '}
<span style={{ color: '#9ad1e7' }}> {date}{" "}</span>{' '}
</h5>
</div>

</div>
);

}
else{
return (
<h5>
<i class="fas fa-circle" style={{ fontSize: '13px' }} /> {key} :{' '}
<i class="fas fa-circle" style={{ fontSize: '13px' }} /> {temp} :{' '}
<span style={{ textAlign: 'center' }} />{' '}
<span style={{ color: '#9ad1e7' }}>{constraints}</span>{' '}
</h5>
);
}
}
}
})}
</div>
</BackSide>
Expand Down

0 comments on commit 2c46597

Please sign in to comment.