Skip to content

Commit

Permalink
Merge pull request #2166 from ever-co/develop
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
evereq authored Feb 5, 2024
2 parents 6ec4f2b + 4d3b1c1 commit 467233b
Show file tree
Hide file tree
Showing 28 changed files with 1,838 additions and 1,835 deletions.
6 changes: 3 additions & 3 deletions apps/extensions/components/popup/Tasks.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import classNames from 'classnames';
import React, { useEffect, useRef, useState } from 'react';
import { act } from 'react-dom/test-utils';
import React, { useEffect, useState } from 'react';

import AppDropdown from '~components/shared/AppDropdown';
import { roundInput, textEllipsis } from '~misc/tailwindClasses';
Expand Down Expand Up @@ -135,7 +134,8 @@ const Tasks: React.FC<Props> = ({ port }) => {
'ml-2 bg-slate-900 text-white rounded p-2',
isEmptyEstimate() && 'bg-slate-600'
)}
onClick={addNewTask}>
onClick={addNewTask}
>
Add Task
</button>
)}
Expand Down
1 change: 0 additions & 1 deletion apps/extensions/components/popup/Timer.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import classNames from 'classnames';
import React, { useEffect, useState } from 'react';

import browser from '~misc/browser';
import { MessageTypesFromBackgroundEnum, MessageTypesToBackgroundEnum } from '~typescript/enums/MessageTypesEnum';
import { TimerStateEnum } from '~typescript/enums/TimerStateEnum';
import type { IPostMessage } from '~typescript/interfaces/PostMessage';
Expand Down
5 changes: 1 addition & 4 deletions apps/extensions/popup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@ import Timer from '~components/popup/Timer';
import './style.css';

import browser from '~misc/browser';
import { MessageTypesFromBackgroundEnum } from '~typescript/enums/MessageTypesEnum';
import { TimerStateEnum } from '~typescript/enums/TimerStateEnum';
import { IPostMessage } from '~typescript/interfaces/PostMessage';
import { ITimerUpdate } from '~typescript/interfaces/TimerUpdate';


function IndexPopup() {
const [port, setPort] = useState<chrome.runtime.Port | null>(null);
Expand Down
2 changes: 1 addition & 1 deletion apps/mobile/app/components/Icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export function Icon(props: IconProps) {
} = props;

const isPressable = !!WrapperProps.onPress;
const Wrapper: ComponentType<TouchableOpacityProps> = WrapperProps?.onPress ? TouchableOpacity : View;
const Wrapper: ComponentType<TouchableOpacityProps> = WrapperProps && WrapperProps?.onPress ? TouchableOpacity : View;

return (
<Wrapper
Expand Down
2 changes: 1 addition & 1 deletion apps/mobile/app/helpers/regex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ export const VALID_HEX_COLOR = /^#(?:[0-9a-fA-F]{3,4}){1,2}$/;
export const PHONE_REGEX = /^[\+]?[(]?[0-9]{3}[)]?[-\s\.]?[0-9]{3}[-\s\.]?[0-9]{4,6}$/;

export const URL_REGEX =
/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()!@:%_\+.~#?&\/\/=]*)$/;
/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()!@:%_\+.~#?&\/=]*)$/;
4 changes: 2 additions & 2 deletions apps/web/app/[locale]/kanban/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ const Kanban = () => {
</button>
</div>
</div>
<div className="relative flex flex-row justify-between items-center mt-10">
<div className="relative flex flex-col lg:flex-row justify-between items-center mt-10">
<div className="flex flex-row">
{tabs.map((tab) => (
<div
Expand All @@ -110,7 +110,7 @@ const Kanban = () => {
</div>
))}
</div>
<div className="flex space-x-2">
<div className="flex space-x-2 mt-5 lg:mt-0">
<Dropdown
searchBar={false}
className="w-24"
Expand Down
21 changes: 12 additions & 9 deletions apps/web/app/[locale]/settings/personal/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,13 @@ const Personal = () => {
{!user ? (
<SettingsPersonalSkeleton />
) : (
<MainLayout className="items-start pb-1">
<div className="pt-12 pb-4 bg-white dark:bg-dark--theme">
<MainLayout
className="items-start pb-1 h-screen "
childrenClassName="overflow-hidden h-full w-screen flex flex-col items-start"
>
<div className="pt-12 w-full pb-4 bg-white dark:bg-dark--theme">
<Container fullWidth={fullWidth}>
<div className="flex items-center gap-8">
<div className="flex flex-row items-center justify-start gap-8">
<Link href="/">
<ArrowLeft className="w-6 h-6" />
</Link>
Expand All @@ -42,18 +45,18 @@ const Personal = () => {
</Container>
</div>

<Container fullWidth={fullWidth} className="mb-10">
<div className="flex flex-col w-full sm:flex-row">
<LeftSideSettingMenu />
<div className="flex flex-col w-full mr-[20px] lg:mr-0">
<Container fullWidth={fullWidth} className="mb-10 flex-1">
<div className="flex flex-col w-full h-full lg:flex-row">
<LeftSideSettingMenu className="h-[72vh] pb-4" />
<div className="flex flex-col flex-1 h-[72vh] sm:mr-[20px] lg:mr-0 overflow-y-scroll">
<Link href={'/settings/team'} className="w-full">
<button className="w-full lg:hidden hover:bg-white rounded-xl border border-dark text-dark p-4 mt-2">
Go to Team settings
</button>
</Link>
<Accordian
title={t('pages.settingsPersonal.HEADING_TITLE')}
className=" max-w-[96vw] overflow-y-hidden p-4 mt-8 dark:bg-dark--theme"
className="w-full md:min-w-[50vw] lg:min-w-[60vw] xl:min-w-[75vw] max-w-[96vw] overflow-y-hidden p-4 mt-8 dark:bg-dark--theme"
id="general"
>
{/* <Text className="text-base font-normal text-center text-gray-400 sm:text-left">
Expand All @@ -64,7 +67,7 @@ const Personal = () => {
</Accordian>
<Accordian
title={t('pages.settings.DANDER_ZONE')}
className="p-4 mt-4 dark:bg-dark--theme"
className="p-4 mt-4 md:min-w-[50vw] lg:min-w-[60vw] xl:min-w-[75vw] dark:bg-dark--theme"
isDanger={true}
id="danger-zone"
>
Expand Down
31 changes: 17 additions & 14 deletions apps/web/app/[locale]/settings/team/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,13 @@ const Team = () => {
{!user ? (
<SettingsTeamSkeleton />
) : (
<MainLayout className="items-start pb-1 max-h-s">
<div className="pt-12 pb-4 bg-white dark:bg-dark--theme">
<Container>
<div className="flex items-center gap-8">
<MainLayout
className="items-start pb-1 h-screen "
childrenClassName="overflow-hidden h-full w-screen flex flex-col items-start"
>
<div className="pt-12 w-full pb-4 bg-white dark:bg-dark--theme">
<Container fullWidth={fullWidth}>
<div className="flex flex-row items-center justify-start gap-8">
<Link href="/">
<ArrowLeft className="w-6 h-6" />
</Link>
Expand All @@ -50,11 +53,11 @@ const Team = () => {
</Container>
</div>

<Container fullWidth={fullWidth} className="mb-10">
<div className="flex flex-col w-full lg:flex-row">
<LeftSideSettingMenu />
<Container fullWidth={fullWidth} className="mb-10 flex-1">
<div className="flex flex-col w-full h-full lg:flex-row">
<LeftSideSettingMenu className="h-[72vh] pb-4" />
{isTeamMember ? (
<div className="flex flex-col w-full sm:mr-[20px] lg:mr-0">
<div className="flex flex-col flex-1 h-[72vh] sm:mr-[20px] lg:mr-0 overflow-y-scroll">
<Link href={'/settings/personal'} className="w-full">
<button className="w-full lg:hidden hover:bg-white rounded-xl border border-dark text-dark p-4 mt-2">
Go to Personnal settings
Expand All @@ -63,7 +66,7 @@ const Team = () => {
{/* General Settings */}
<Accordian
title={t('pages.settingsTeam.HEADING_TITLE')}
className="max-w-[66vw] p-4 mt-8 dark:bg-dark--theme"
className="w-full md:min-w-[50vw] lg:min-w-[60vw] xl:min-w-[75vw] max-w-[80vw] p-4 mt-8 dark:bg-dark--theme"
id="general-settings"
>
<div className="flex flex-col">
Expand All @@ -76,7 +79,7 @@ const Team = () => {
{isTeamManager ? (
<Accordian
title={t('pages.settingsTeam.INVITATION_HEADING_TITLE')}
className="max-w-[66vw] overflow-y-auto p-4 mt-4 dark:bg-dark--theme"
className="w-full md:min-w-[50vw] lg:min-w-[60vw] xl:min-w-[75vw] max-w-[80vw] overflow-y-auto p-4 mt-4 dark:bg-dark--theme"
id="invitations"
>
<InvitationSetting />
Expand All @@ -89,7 +92,7 @@ const Team = () => {
{isTeamManager ? (
<Accordian
title={t('pages.settingsTeam.MEMBER_HEADING_TITLE')}
className="max-w-[66vw] p-4 mt-4 dark:bg-dark--theme"
className="w-full md:min-w-[50vw] lg:min-w-[60vw] xl:min-w-[75vw] max-w-[80vw] p-4 mt-4 dark:bg-dark--theme"
id="member"
>
<MemberSetting />
Expand All @@ -101,7 +104,7 @@ const Team = () => {
{isTeamManager && (
<Accordian
title={t('pages.settingsTeam.INTEGRATIONS')}
className="max-w-[66vw] p-4 mt-4 dark:bg-dark--theme"
className="w-full md:min-w-[50vw] lg:min-w-[60vw] xl:min-w-[75vw] max-w-[80vw] p-4 mt-4 dark:bg-dark--theme"
id="integrations"
>
<IntegrationSetting />
Expand All @@ -111,7 +114,7 @@ const Team = () => {
{/* Issues Settings */}
<Accordian
title={t('pages.settingsTeam.ISSUES_HEADING_TITLE')}
className="max-w-[66vw] overflow-y-auto p-4 mt-4 dark:bg-dark--theme"
className="w-full md:min-w-[50vw] lg:min-w-[60vw] xl:min-w-[75vw] max-w-[80vw] overflow-y-auto p-4 mt-4 dark:bg-dark--theme"
id="issues-settings"
>
<IssuesSettings />
Expand All @@ -129,7 +132,7 @@ const Team = () => {
{/* Danger Zone */}
<Accordian
title={t('pages.settings.DANDER_ZONE')}
className="max-w-[66vw] p-4 mt-4 dark:bg-dark--theme"
className="w-full md:min-w-[50vw] lg:min-w-[60vw] xl:min-w-[75vw] max-w-[80vw] p-4 mt-4 dark:bg-dark--theme"
isDanger={true}
id="danger-zones"
>
Expand Down
2 changes: 1 addition & 1 deletion apps/web/app/helpers/regex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ export const VALID_HEX_COLOR = /^#(?:[0-9a-fA-F]{3,4}){1,2}$/;
export const PHONE_REGEX = /^[+]?[(]?[0-9]{3}[)]?[-\s.]?[0-9]{3}[-\s.]?[0-9]{4,6}$/;

export const URL_REGEX =
/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()!@:%_+.~#?&//=]*)$/;
/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()!@:%_+.~#?&/=]*)$/;
2 changes: 1 addition & 1 deletion apps/web/app/hooks/auth/useAuthenticationPasscode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export function useAuthenticationPasscode() {
return;
}

if (data?.workspaces && data.workspaces.length) {
if (data && Array.isArray(data.workspaces) && data.workspaces.length > 0) {
setWorkspaces(data.workspaces);

setScreen('workspace');
Expand Down
2 changes: 1 addition & 1 deletion apps/web/app/hooks/features/usePublicOrganizationTeams.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export function usePublicOrganizationTeams() {
}

let responseTasks = (res.data.tasks as ITeamTask[]) || [];
if (responseTasks && responseTasks.length) {
if (Array.isArray(responseTasks) && responseTasks.length > 0) {
responseTasks = responseTasks.map((task) => {
const clone = cloneDeep(task);
if (task.tags && task.tags?.length) {
Expand Down
4 changes: 2 additions & 2 deletions apps/web/app/services/client/api/public-organization-team.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export function getPublicOrganizationTeamsAPI(profile_link: string, team_id: str
params[`relations[${i}]`] = rl;
});

const queries = qs.stringify(params || {});
const queries = qs.stringify(params);

const endpoint = GAUZY_API_BASE_SERVER_URL.value
? `/public/team/${profile_link}/${team_id}?${queries}`
Expand All @@ -48,7 +48,7 @@ export function getPublicOrganizationTeamsMiscDataAPI(profile_link: string, team
params[`relations[${i}]`] = rl;
});

const queries = qs.stringify(params || {});
const queries = qs.stringify(params);

const endpoint = GAUZY_API_BASE_SERVER_URL.value
? `/public/team/${profile_link}/${team_id}?${queries}`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export function getPublicOrganizationTeamMiscDataRequest({
params[`relations[${i}]`] = rl;
});

const queries = qs.stringify(params || {});
const queries = qs.stringify(params);

return serverFetch<IOrganizationTeamWithMStatus>({
path: `/public/team/${profileLink}/${teamId}?${queries.toString()}`,
Expand Down
14 changes: 7 additions & 7 deletions apps/web/lib/components/Kanban.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,15 @@ function headerStyleChanger(snapshot: DraggableStateSnapshot, bgColor: any) {
}

/**
* wrapper to ensure card is draggable
* wrapper to ensure the card is draggable
* @param param0
* @returns
*/
function InnerItemList({ items, title }: { title: string; items: ITeamTask[]; dropSnapshot: DroppableStateSnapshot }) {
return (
<>
<section
className="flex flex-col pb-2 overflow-x-hidden"
className="flex flex-col pb-2"
>
{items.map((item: ITeamTask, index: number) => (
<Draggable key={item.id} draggableId={item.id} index={index}>
Expand Down Expand Up @@ -113,7 +113,7 @@ function InnerList(props: {
}

/**
* wrapper to allow inner column act as
* wrapper to allow the inner column to act as
* a droppable area for cards being dragged
* @param param0
* @returns
Expand Down Expand Up @@ -154,7 +154,7 @@ export const KanbanDroppable = ({
};

/**
* wrapper to allow inner column act as
* wrapper to allow the inner column to act as
* a droppable area for cards being dragged
* @param param0
* @returns
Expand Down Expand Up @@ -206,7 +206,7 @@ export const EmptyKanbanDroppable = ({
style={headerStyleChanger(snapshot, backgroundColor)}
data-isDragging={snapshot.isDragging}
>
<div className="flex flex-col items-center gap-2">
<div className="flex flex-col items-center gap-2">
<button className="rotate-180" onClick={() => toggleColumn(title, false)}>
<LeftArrowTailessIcon />
</button>
Expand Down Expand Up @@ -339,8 +339,8 @@ const KanbanDraggable = ({
ref={provided.innerRef}
{...provided.draggableProps}
{...provided.dragHandleProps}
style={getItemStyle(snapshot.isDragging, provided.draggableProps.style)}
className="relative flex flex-col px-2 w-[355px]"
// style={getItemStyle(snapshot.isDragging, provided.draggableProps.style)}
className="relative flex flex-col px-2 h-[1000px] w-[355px]"
>
{title ? (
<>
Expand Down
4 changes: 2 additions & 2 deletions apps/web/lib/features/team-members-kanban-view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ export const KanbanView = ({ kanbanBoardTasks }: { kanbanBoardTasks: IKanban })
{(provided: DroppableProvided, snapshot: DroppableStateSnapshot) => (
<div
className={clsxm(
'flex flex-row justify-start overflow-x-auto w-full min-h-[600px] p-[32px] bg-transparent dark:bg-[#181920]',
'flex flex-row justify-start overflow-x-auto w-full min-h-[calc(100vh-_422px)] max-h-[calc(100vh-_422px)] p-[32px] bg-transparent dark:bg-[#181920]',
snapshot.isDraggingOver ? 'lightblue' : '#F7F7F8'
)}
ref={provided.innerRef}
Expand All @@ -194,7 +194,7 @@ export const KanbanView = ({ kanbanBoardTasks }: { kanbanBoardTasks: IKanban })
{columns.map((column: string, index: number) => {
return (
<React.Fragment key={index}>
<div className="flex flex-col " key={index}>
<div className="flex flex-col a" key={index}>
{isColumnCollapse(column) ? (
<EmptyKanbanDroppable
index={index}
Expand Down
2 changes: 1 addition & 1 deletion apps/web/lib/features/team-members.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export function TeamMembers({ publicTeam = false, kanbanView: view = IssuesView.
const orderedMembers = [...members].sort((a, b) => (sortByWorkStatus(a, b) ? -1 : 1));

const blockViewMembers =
activeFilter == 'all' ? orderedMembers : orderedMembers.filter((m) => m.timerStatus === activeFilter) || [];
activeFilter == 'all' ? orderedMembers : orderedMembers.filter((m) => m.timerStatus === activeFilter);

const currentUser = members.find((m) => m.employee.userId === user?.id);
const $members = members
Expand Down
5 changes: 3 additions & 2 deletions apps/web/lib/settings/left-side-setting-menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ import { useCallback, useEffect, useMemo, useState } from 'react';
import { useTranslations } from 'next-intl';
import { useRecoilState } from 'recoil';
import Link from 'next/link';
import { clsxm } from '@app/utils';

export const LeftSideSettingMenu = () => {
export const LeftSideSettingMenu = ({ className}: { className?: string}) => {
const t = useTranslations();
const { PersonalAccordianData, TeamAccordianData } = useLeftSettingData();
const pathname = usePathname();
Expand Down Expand Up @@ -65,7 +66,7 @@ export const LeftSideSettingMenu = () => {

return (
<>
<div className="hidden lg:block lg:w-[320px] mt-[36px] sm:mr-[56px] mx-auto">
<div className={clsxm("hidden lg:block lg:w-[320px] mt-[36px] sm:mr-[56px] mx-auto h-full overflow-y-auto", className)}>
<Text className="text-4xl font-normal mb-[40px] text-center sm:text-left">{t('common.SETTINGS')}</Text>
<div className="flex sm:block">
<SidebarAccordian
Expand Down
2 changes: 1 addition & 1 deletion apps/web/messages/bg.json
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@
"ALERT_DELETE_ACCOUNT": "Профилът ще бъде премахнат от всички отбори, освен където сте само мениджър",
"ALERT_ACCOUNT_PERMANENT_DELETE": "Вашият профил ще бъде изтрит завинаги с премахване от всички отбори",
"ALERT_REMOVE_TEAM": "Отборът ще бъде премахнат напълно от системата и членовете на отбора ще загубят достъп",
"ALERT_REMOVE_ALL_DATA": "All Account Data will be removed from all teams where you are ONLY one existed manager",
"ALERT_REMOVE_ALL_DATA": "Всички данни за профила ще бъдат премахнати от всички отбори, освен където сте само мениджър",
"ALERT_QUIT_TEAM": "Ще напуснете отбора"
},
"pages": {
Expand Down
2 changes: 1 addition & 1 deletion apps/web/messages/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@
"ALERT_DELETE_ACCOUNT": "Das Konto wird von allen Teams entfernt, außer wo Sie nur Manager sind",
"ALERT_ACCOUNT_PERMANENT_DELETE": "Ihr Konto wird dauerhaft gelöscht und von allen Teams entfernt",
"ALERT_REMOVE_TEAM": "Das Team wird vollständig aus dem System entfernt und die Teammitglieder verlieren den Zugriff",
"ALERT_REMOVE_ALL_DATA": "All Account Data will be removed from all teams where you are ONLY one existed manager",
"ALERT_REMOVE_ALL_DATA": "Alle Kontodaten werden von allen Teams entfernt, in denen Sie der EINZIGE Manager sind",
"ALERT_QUIT_TEAM": "Sie sind im Begriff, das Team zu verlassen"
},
"pages": {
Expand Down
4 changes: 2 additions & 2 deletions apps/web/messages/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@
"ALERT_DELETE_ACCOUNT": "La cuenta será eliminada de todos los equipos, excepto donde eres sólo el administrador",
"ALERT_ACCOUNT_PERMANENT_DELETE": "Tu cuenta será eliminada permanentemente con la eliminación de todos los equipos",
"ALERT_REMOVE_TEAM": "El equipo será eliminado completamente del sistema y los miembros del equipo perderán el acceso",
"ALERT_REMOVE_ALL_DATA": "All Account Data will be removed from all teams where you are ONLY one existed manager",
"ALERT_REMOVE_ALL_DATA": "Todos los datos de la cuenta serán eliminados de todos los equipos donde eres el único administrador existente",
"ALERT_QUIT_TEAM": "Estás a punto de abandonar el equipo"
},
"pages": {
Expand Down Expand Up @@ -236,7 +236,7 @@
"INVALID_INVITE_CODE_MESSAGE": "Código inválido",
"WELCOME_TEAMS": "Bienvenido a Equipos Siempre",
"COVER_TITLE": "¡Sigue el progreso del trabajo de tus equipos en tiempo real!",
"COVER_DESCRIPTION": "All-In-One Work & Workforce Management, Time Management, Time Tracking, Activity Tracking, Productivity Tracking & Metrics, Projects / Tasks & Issues Management, Organizations & Teams, Integrations (GitHub, JIRA, ...) and More!",
"COVER_DESCRIPTION": "Gestión de trabajo y fuerza laboral todo en uno, gestión del tiempo, seguimiento del tiempo, seguimiento de la actividad, seguimiento de la productividad y métricas, gestión de proyectos/tareas y problemas, organizaciones y equipos, integraciones (GitHub, JIRA, ...) y más!",
"LOGIN": "Iniciar sesión",
"SELECT_WORKSPACE": "Seleccionar espacio de trabajo",
"ENTER_EMAIL": "Ingresar correo electrónico",
Expand Down
Loading

0 comments on commit 467233b

Please sign in to comment.