Skip to content

Commit

Permalink
Merge pull request #2035 from ever-co/fix/ui-fixes-kanban
Browse files Browse the repository at this point in the history
Fix/UI fixes kanban
  • Loading branch information
evereq authored Dec 29, 2023
2 parents 7b5fb59 + fceddf1 commit c11e087
Show file tree
Hide file tree
Showing 9 changed files with 630 additions and 626 deletions.
26 changes: 14 additions & 12 deletions apps/web/app/[locale]/kanban/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,17 @@ const Kanban = () => {
const { data } = useKanban();
const { activeTeam } = useOrganizationTeams();
const t = useTranslations();
const params = useParams<{locale: string}>();
const params = useParams<{ locale: string }>();

const currentLocale = params ? params.locale : null;

const [activeTab, setActiveTab] = useState(KanbanTabs.TODAY);

const breadcrumbPath = [{title: JSON.parse(t('pages.home.BREADCRUMB')), href: '/'}, {title: activeTeam?.name || '', href:'/'}, {title:'Kanban Board', href: `/${currentLocale}/kanban`}];
const breadcrumbPath = [
{ title: JSON.parse(t('pages.home.BREADCRUMB')), href: '/' },
{ title: activeTeam?.name || '', href: '/' },
{ title: 'Kanban Board', href: `/${currentLocale}/kanban` }
];

const imageRadius = 20;
const numberOfImagesDisplayed = 4;
Expand All @@ -39,9 +43,7 @@ const Kanban = () => {
<div className={'relative bg-white dark:bg-dark--theme pt-20 -mt-8 px-[32px] mx-[0px] w-full'}>
<Breadcrumb paths={breadcrumbPath} className="text-sm" />
<div className="flex flex-row items-center justify-between mt-[24px]">
<div>

</div>
<div></div>
<div className="flex flex-row items-center gap-[12px]">
<p>08:00 ( UTC +04:30 )</p>
<VerticalLine />
Expand Down Expand Up @@ -89,9 +91,9 @@ const Kanban = () => {
onClick={() => {
setActiveTab(KanbanTabs.TODAY);
}}
className={`cursor-pointer pt-2.5 px-5 pb-[30px] text-base font-bold ${
className={`cursor-pointer pt-2.5 px-5 pb-[30px] text-base font-semibold ${
activeTab === KanbanTabs.TODAY
? 'border-b-[#3826A6] text-[#3826A6]'
? 'border-b-[#3826A6] text-[#3826A6] dark:text-white dark:border-b-white'
: 'border-b-white dark:border-b-[#191A20] dark:text-white text-[#282048]'
}`}
style={{
Expand All @@ -105,9 +107,9 @@ const Kanban = () => {
onClick={() => {
setActiveTab(KanbanTabs.YESTERDAY);
}}
className={`cursor-pointer pt-2.5 px-5 pb-[30px] text-base font-bold ${
className={`cursor-pointer pt-2.5 px-5 pb-[30px] text-base font-semibold ${
activeTab === KanbanTabs.YESTERDAY
? 'border-b-[#3826A6] text-[#3826A6]'
? 'border-b-[#3826A6] text-[#3826A6] dark:text-white dark:border-b-white'
: 'border-b-white dark:border-b-[#191A20] dark:text-white text-[#282048]'
}`}
style={{
Expand All @@ -121,9 +123,9 @@ const Kanban = () => {
onClick={() => {
setActiveTab(KanbanTabs.TOMORROW);
}}
className={`cursor-pointer pt-2.5 px-5 pb-[30px] text-base font-bold ${
className={`cursor-pointer pt-2.5 px-5 pb-[30px] text-base font-semibold ${
activeTab === KanbanTabs.TOMORROW
? 'border-b-[#3826A6] text-[#3826A6]'
? 'border-b-[#3826A6] text-[#3826A6] dark:text-white dark:border-b-white'
: 'border-b-white dark:border-b-[#191A20] dark:text-white text-[#282048]'
}`}
style={{
Expand Down
21 changes: 15 additions & 6 deletions apps/web/components/ui/svgs/left-arrow-tailess.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
export default function LeftArrowTailessIcon() {
return (
<>
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24"><path fill="none" stroke="white" strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d="m14 7l-5 5m0 0l5 5"/></svg>
</>
)
}
return (
<>
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24">
<path
fill="none"
stroke="black"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth="2"
d="m14 7l-5 5m0 0l5 5"
/>
</svg>
</>
);
}
57 changes: 29 additions & 28 deletions apps/web/lib/app/authenticator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,36 +52,37 @@ export function withAuthentication(Component: NextPage<any, any>, params: Params
}
}, [queryCall, setUser, user]);

if (!user || loading) {
return <></>;
}
if (showPageSkeleton) {
return <TeamPageSkeleton />;
}

return (
<>
{(!user || loading) && showPageSkeleton ? (
<TeamPageSkeleton />
) : (
<>
<Component {...props} />
{user && !isTeamMember && showCreateTeamModal && (
<CreateTeamModal
open={showCreateTeamModal}
closeModal={() => {
closeModalIfNewTeamCreated();
}}
joinTeamModal={() => {
setShowCreateTeamModal(false);
setShowJoinTeamModal(true);
}}
/>
)}
{user && !isTeamMember && showJoinTeamModal && (
<JoinTeamModal
open={showJoinTeamModal}
closeModal={() => {
closeModalIfNewTeamCreated();
}}
/>
)}
</>
<div>
<Component {...props} />
{!isTeamMember && showCreateTeamModal && (
<CreateTeamModal
open={showCreateTeamModal}
closeModal={() => {
closeModalIfNewTeamCreated();
}}
joinTeamModal={() => {
setShowCreateTeamModal(false);
setShowJoinTeamModal(true);
}}
/>
)}
{!isTeamMember && showJoinTeamModal && (
<JoinTeamModal
open={showJoinTeamModal}
closeModal={() => {
closeModalIfNewTeamCreated();
}}
/>
)}
</>
</div>
);
};

Expand Down
Loading

0 comments on commit c11e087

Please sign in to comment.