Merge pull request #48 from makeplane/sync/ce-ee

sync: bugfixes
This commit is contained in:
sriram veeraghanta
2023-12-20 18:56:22 +05:30
committed by GitHub
3 changed files with 9 additions and 6 deletions

View File

@@ -37,8 +37,7 @@ export const WorkspaceDashboardView = observer(() => {
workspaceSlug ? `USER_WORKSPACE_DASHBOARD_${workspaceSlug}_${month}` : null,
workspaceSlug ? () => userStore.fetchUserDashboardInfo(workspaceSlug.toString(), month) : null
);
const isEditingAllowed = !!userStore.currentProjectRole && userStore.currentProjectRole >= EUserWorkspaceRoles.MEMBER;
const isEditingAllowed = !!userStore.currentWorkspaceRole && userStore.currentWorkspaceRole >= EUserWorkspaceRoles.MEMBER;
const handleTourCompleted = () => {
userStore

View File

@@ -23,12 +23,11 @@ export const ProjectCardList: FC<IProjectCardList> = observer((props) => {
project: projectStore,
commandPalette: commandPaletteStore,
trackEvent: { setTrackElement },
user: { currentProjectRole },
user: { currentWorkspaceRole },
} = useMobxStore();
const projects = workspaceSlug ? projectStore.projects[workspaceSlug.toString()] : null;
const isEditingAllowed = !!currentProjectRole && currentProjectRole >= EUserWorkspaceRoles.MEMBER;
const isEditingAllowed = !!currentWorkspaceRole && currentWorkspaceRole >= EUserWorkspaceRoles.MEMBER;
if (!projects) {
return (

View File

@@ -246,6 +246,11 @@ const PageDetailsPage: NextPageWithLayout = observer(() => {
// ================ Page Menu Actions ==================
const duplicate_page = async () => {
const currentPageValues = getValues();
if (!currentPageValues?.description_html) {
currentPageValues.description_html = pageDetails?.description_html as string;
}
const formData: Partial<IPage> = {
name: "Copy of " + pageDetails?.name,
description_html: currentPageValues.description_html,
@@ -336,7 +341,7 @@ const PageDetailsPage: NextPageWithLayout = observer(() => {
debounce(async () => {
handleSubmit(updatePage)().finally(() => setIsSubmitting("submitted"));
}, 1500),
[handleSubmit]
[handleSubmit, pageDetails]
);
if (error)