fix: ui improvement and bug fixes (#2105)

* chore: workspace level typo fix

* fix: setting opacity fix
This commit is contained in:
Anmol Singh Bhatia 2023-09-06 16:15:21 +05:30 committed by GitHub
parent 2ad46d7bfa
commit 58562dc4b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 10 deletions

View File

@ -212,7 +212,7 @@ export const ExistingIssuesListModal: React.FC<Props> = ({
onClick={() => setIsWorkspaceLevel((prevData) => !prevData)} onClick={() => setIsWorkspaceLevel((prevData) => !prevData)}
className="flex-shrink-0" className="flex-shrink-0"
> >
workspace level Workspace Level
</button> </button>
</div> </div>
</Tooltip> </Tooltip>

View File

@ -136,7 +136,7 @@ export const ParentIssuesListModal: React.FC<Props> = ({
onClick={() => setIsWorkspaceLevel((prevData) => !prevData)} onClick={() => setIsWorkspaceLevel((prevData) => !prevData)}
className="flex-shrink-0" className="flex-shrink-0"
> >
workspace level Workspace Level
</button> </button>
</div> </div>
</Tooltip> </Tooltip>

View File

@ -187,7 +187,7 @@ const GeneralSettings: NextPage = () => {
/> />
<form onSubmit={handleSubmit(onSubmit)} className="p-8"> <form onSubmit={handleSubmit(onSubmit)} className="p-8">
<SettingsHeader /> <SettingsHeader />
<div className="space-y-8 sm:space-y-12 opacity-60"> <div className={`space-y-8 sm:space-y-12 ${isAdmin ? "" : "opacity-60"}`}>
<div className="grid grid-cols-12 items-start gap-4 sm:gap-16"> <div className="grid grid-cols-12 items-start gap-4 sm:gap-16">
<div className="col-span-12 sm:col-span-6"> <div className="col-span-12 sm:col-span-6">
<h4 className="text-lg font-semibold">Icon & Name</h4> <h4 className="text-lg font-semibold">Icon & Name</h4>

View File

@ -90,9 +90,8 @@ const WorkspaceSettings: NextPage = () => {
await workspaceService await workspaceService
.updateWorkspace(activeWorkspace.slug, payload, user) .updateWorkspace(activeWorkspace.slug, payload, user)
.then((res) => { .then((res) => {
mutate<IWorkspace[]>( mutate<IWorkspace[]>(USER_WORKSPACES, (prevData) =>
USER_WORKSPACES, prevData?.map((workspace) => (workspace.id === res.id ? res : workspace))
(prevData) => prevData?.map((workspace) => (workspace.id === res.id ? res : workspace))
); );
mutate<IWorkspace>(WORKSPACE_DETAILS(workspaceSlug as string), (prevData) => { mutate<IWorkspace>(WORKSPACE_DETAILS(workspaceSlug as string), (prevData) => {
if (!prevData) return prevData; if (!prevData) return prevData;
@ -125,9 +124,8 @@ const WorkspaceSettings: NextPage = () => {
title: "Success!", title: "Success!",
message: "Workspace picture removed successfully.", message: "Workspace picture removed successfully.",
}); });
mutate<IWorkspace[]>( mutate<IWorkspace[]>(USER_WORKSPACES, (prevData) =>
USER_WORKSPACES, prevData?.map((workspace) => (workspace.id === res.id ? res : workspace))
(prevData) => prevData?.map((workspace) => (workspace.id === res.id ? res : workspace))
); );
mutate<IWorkspace>(WORKSPACE_DETAILS(workspaceSlug as string), (prevData) => { mutate<IWorkspace>(WORKSPACE_DETAILS(workspaceSlug as string), (prevData) => {
if (!prevData) return prevData; if (!prevData) return prevData;
@ -183,7 +181,7 @@ const WorkspaceSettings: NextPage = () => {
<div className="p-8"> <div className="p-8">
<SettingsHeader /> <SettingsHeader />
{activeWorkspace ? ( {activeWorkspace ? (
<div className="space-y-8 sm:space-y-12 opacity-60"> <div className={`space-y-8 sm:space-y-12 ${isAdmin ? "" : "opacity-60"}`}>
<div className="grid grid-cols-12 gap-4 sm:gap-16"> <div className="grid grid-cols-12 gap-4 sm:gap-16">
<div className="col-span-12 sm:col-span-6"> <div className="col-span-12 sm:col-span-6">
<h4 className="text-lg font-semibold">Logo</h4> <h4 className="text-lg font-semibold">Logo</h4>