-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: delete unused component * chore: add `index.ts` to export route components * refactor: create a custom avatar component to handle all avatars * refactor: calender components * fix: move quotes components under the components/quotes * fix: move company components under the components/company * refactor: seperate contact components * fix: add missing type * fix: add debounce to compony search * fix: calender page style issues * fix: calander show drawer issue * fix: datepicker bg color * fix: padding issues on event timeline * fix: compony create logic * fix: add "see calendar" button * fix: color picker input * fix: add delete button to card * fix: update contact page style issues * fix: contact modal drawer style issues * chore: fix build errorr * feat(app-crm): randomly select user email (#4877) * feat(app-crm) company detail page (#4873) * feat(app-crm): add company detail page * fix(app-crm): typo * feat(app-crm): add company notes * feat(app-crm): add missing fields and filters * feat(app-crm): add resource to useTable * fix(app-crm): disable company list query on create page * feat(app-crm): persist table filters * feat(app-crm): memoize avatar * feat(app-crm): use drag overlay --------- Co-authored-by: Alican Erdurmaz <[email protected]>
- Loading branch information
1 parent
ba7c974
commit c9e4ab6
Showing
78 changed files
with
3,359 additions
and
1,213 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
examples/app-crm/src/components/calendar/calendar-cell.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import { Badge } from "antd"; | ||
import dayjs, { Dayjs } from "dayjs"; | ||
|
||
import { Text } from "../text"; | ||
import { Event } from "../../interfaces/graphql"; | ||
|
||
type CalendarCellProps = { | ||
value: Dayjs; | ||
events: Event[]; | ||
onClickEvent?: (event: Event) => void; | ||
}; | ||
|
||
export const CalendarCell: React.FC<CalendarCellProps> = ({ | ||
events, | ||
value, | ||
onClickEvent, | ||
}) => { | ||
const todayEvents = events.filter((event) => { | ||
const startDate = dayjs(event.startDate); | ||
const endDate = dayjs(event.endDate); | ||
|
||
return ( | ||
startDate.isSame(value, "day") || | ||
endDate.isSame(value, "day") || | ||
(startDate.isBefore(value, "day") && endDate.isAfter(value, "day")) | ||
); | ||
}); | ||
|
||
return ( | ||
<div> | ||
{todayEvents.slice(0, 3).map((item) => ( | ||
<div onClick={() => onClickEvent?.(item)} key={item.id}> | ||
<Text ellipsis={{ tooltip: true }}> | ||
<Badge | ||
style={{ marginRight: "0.5rem" }} | ||
color={item.color} | ||
/> | ||
{item.title} | ||
</Text> | ||
</div> | ||
))} | ||
{todayEvents.length > 3 && ( | ||
<Text strong>{todayEvents.length - 3} more</Text> | ||
)} | ||
</div> | ||
); | ||
}; |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
11 changes: 6 additions & 5 deletions
11
.../components/calender/categories/index.tsx → .../components/calendar/categories/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export * from "./calendar"; | ||
export * from "./upcoming-events"; | ||
export * from "./categories"; | ||
export * from "./calendar-cell"; |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.