Skip to content

Commit 004f956

Browse files
Merge pull request #74 from contentstack/feature/project-dashboard
Feature/project dashboard
2 parents b49dc34 + 479f677 commit 004f956

File tree

21 files changed

+458
-324
lines changed

21 files changed

+458
-324
lines changed

ui/src/cmsData/legacyCms.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,4 +269,4 @@
269269
"restricted_keyword_checkbox_text": "Please acknowledge that you have referred to the Contentstack restricted keywords",
270270
"affix_cta": "Continue",
271271
"file_format_cta": "Continue"
272-
}
272+
}

ui/src/components/AdvancePropertise/index.tsx

Lines changed: 26 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
import {
22
ModalBody,
3-
ModalFooter,
43
ModalHeader,
5-
Button,
6-
ButtonGroup,
74
FieldLabel,
85
TextInput,
96
ToggleSwitch
@@ -13,6 +10,8 @@ import './index.scss';
1310

1411
export interface SchemaProps {
1512
fieldtype: string;
13+
value: any;
14+
rowId: string;
1615
closeModal: () => void;
1716
}
1817
const AdvancePropertise = (props: SchemaProps) => {
@@ -33,24 +32,36 @@ const AdvancePropertise = (props: SchemaProps) => {
3332
Options
3433
</FieldLabel>
3534
<div className="options-class">
36-
<ToggleSwitch label="Mandatory" labelColor="primary" labelPosition="right" />
37-
<ToggleSwitch label="Multiple" labelColor="primary" labelPosition="right" />
38-
<ToggleSwitch label="Unique" labelColor="primary" labelPosition="right" />
39-
<ToggleSwitch label="Non-localizable" labelColor="primary" labelPosition="right" />
35+
<ToggleSwitch
36+
label="Mandatory"
37+
labelColor="primary"
38+
labelPosition="right"
39+
checked={props?.value?.mandatory}
40+
/>
41+
<ToggleSwitch
42+
label="Multiple"
43+
labelColor="primary"
44+
labelPosition="right"
45+
checked={props?.value?.multiple}
46+
/>
47+
<ToggleSwitch
48+
label="Unique"
49+
labelColor="primary"
50+
labelPosition="right"
51+
checked={props?.value?.unique}
52+
/>
53+
<ToggleSwitch
54+
label="Non-localizable"
55+
labelColor="primary"
56+
labelPosition="right"
57+
checked={props?.value?.non_localizable}
58+
/>
4059
<p className="non-localizable-message">
4160
If enabled, editing this field is restricted in localized entries. The field will use
4261
the value of the master-language entry in all localized entries.
4362
</p>
4463
</div>
4564
</ModalBody>
46-
{/* <ModalFooter>
47-
<ButtonGroup>
48-
<Button buttonType="light" onClick={() => props.closeModal()}>
49-
Cancel
50-
</Button>
51-
<Button>Save and proceed</Button>
52-
</ButtonGroup>
53-
</ModalFooter> */}
5465
</>
5566
);
5667
};

ui/src/components/Card/card.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@
6868
}
6969
.ProjectCard__modified-date {
7070
color: $color-font-base;
71-
display:block;
72-
font-size:$size-font-small;
71+
display: block;
72+
font-size: $size-font-small;
7373
font-weight: $font-weight-regular;
7474
line-height: $line-height-reset;
7575
padding-left: 8px;

ui/src/components/Card/index.tsx

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,17 @@ const CardList = ({ project }: ProjectType) => {
1919
if (isEmptyString(id)) return;
2020
navigate(`/projects/${id}/migration/steps/1`);
2121
};
22-
2322
useEffect(() => {
2423
const fetchProject = async () => {
25-
const { data, status } = await getProject(
26-
selectedOrganisation?.value || '',
27-
project?.id || ''
28-
);
29-
if (data?.legacy_cms && status === 200) {
30-
setprojectDetails(data?.legacy_cms?.cms);
24+
if (selectedOrganisation?.value && project?.id) {
25+
const { data, status } = await getProject(selectedOrganisation?.value, project?.id);
26+
if (status === 200 && data?.legacy_cms) {
27+
setprojectDetails(data?.legacy_cms.cms);
28+
}
3129
}
3230
};
3331
fetchProject();
34-
}, [projectDetails]);
32+
}, [selectedOrganisation?.value, project?.id]);
3533

3634
return (
3735
<div style={{ padding: '0 20px 20px 0' }}>

ui/src/components/Common/Settings/Settings.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
.PageLayout {
1414
width: 100%;
1515
}
16-
.PageLayout__head {
16+
.PageLayout__head {
1717
border-left: 0 none;
1818
}
1919
}

ui/src/components/ContentMapper/contentMapper.interface.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,10 @@ export interface ContentTypeList {
9393

9494
export interface optionsType {
9595
label?: string;
96-
value?: string;
96+
value?: object;
9797
isDisabled?: boolean;
9898
}
99+
100+
export interface ExstingContentTypeMatch {
101+
[key: string]: string;
102+
}

0 commit comments

Comments
 (0)