mirror of
https://github.com/hazemKrimi/crimson-quirks-ui.git
synced 2026-05-01 18:20:28 +00:00
Update project page
This commit is contained in:
@@ -11,6 +11,7 @@ import {
|
|||||||
Empty,
|
Empty,
|
||||||
FullBuild,
|
FullBuild,
|
||||||
MVP,
|
MVP,
|
||||||
|
Payment,
|
||||||
Settings,
|
Settings,
|
||||||
Specification,
|
Specification,
|
||||||
} from '../../assets';
|
} from '../../assets';
|
||||||
@@ -83,7 +84,7 @@ const Project = () => {
|
|||||||
id: currentUser?.id!,
|
id: currentUser?.id!,
|
||||||
},
|
},
|
||||||
onCompleted({ getAllProjectsByClientId }) {
|
onCompleted({ getAllProjectsByClientId }) {
|
||||||
setProject(getAllProjectsByClientId[0]);
|
history.push(`/project/${getAllProjectsByClientId[0].id}`);
|
||||||
},
|
},
|
||||||
fetchPolicy: 'network-only',
|
fetchPolicy: 'network-only',
|
||||||
});
|
});
|
||||||
@@ -93,7 +94,7 @@ const Project = () => {
|
|||||||
GetAllUsersQueryVariables
|
GetAllUsersQueryVariables
|
||||||
>(GET_ALL_PROJECTS, {
|
>(GET_ALL_PROJECTS, {
|
||||||
onCompleted({ getAllProjects }) {
|
onCompleted({ getAllProjects }) {
|
||||||
setProject(getAllProjects[0]);
|
history.push(`/project/${getAllProjects[0].id}`);
|
||||||
},
|
},
|
||||||
fetchPolicy: 'network-only',
|
fetchPolicy: 'network-only',
|
||||||
});
|
});
|
||||||
@@ -417,6 +418,20 @@ const Project = () => {
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
|
{role === 'client' && (
|
||||||
|
<Box marginRight='20px'>
|
||||||
|
<Button
|
||||||
|
color={role || 'client'}
|
||||||
|
variant='primary-action'
|
||||||
|
text='Payments'
|
||||||
|
iconLeft={<Payment />}
|
||||||
|
// disabled={project}
|
||||||
|
onClick={() =>
|
||||||
|
history.push(`/payments/${project.id}`)
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</Box>
|
||||||
|
)}
|
||||||
{role === 'client' && (
|
{role === 'client' && (
|
||||||
<Box>
|
<Box>
|
||||||
<Button
|
<Button
|
||||||
|
|||||||
Reference in New Issue
Block a user