Skip to content

Commit

Permalink
Merge branch 'ref-213-project-kanban-list-view' of https://github.com…
Browse files Browse the repository at this point in the history
…/refinedev/refine into ref-213-project-kanban-list-view
  • Loading branch information
salihozdemir committed Aug 22, 2023
2 parents 58b0f2c + 1979d25 commit 4b5c45e
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 11 deletions.
5 changes: 3 additions & 2 deletions examples/app-crm/src/components/deal-kanban-card/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { MoreOutlined, EyeOutlined, DeleteOutlined } from "@ant-design/icons";
import dayjs from "dayjs";
import { Text } from "../text";
import { getRandomColorFromString } from "../../utilities";
import { User } from "../../interfaces/graphql";

type Props = {
id: string;
Expand All @@ -21,7 +22,7 @@ type Props = {
date: string;
user: {
name: string;
avatar?: string;
avatarUrl?: User["avatarUrl"];
};
company: {
name: string;
Expand Down Expand Up @@ -152,7 +153,7 @@ export const DealKanbanCard: FC<Props> = ({
}}
shape="circle"
size="small"
src={user?.avatar}
src={user?.avatarUrl}
alt={user?.name}
>
{user?.name[0]}
Expand Down
5 changes: 3 additions & 2 deletions examples/app-crm/src/components/project-kanban-card/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import {
getNameInitials,
getRandomColorFromString,
} from "../../utilities";
import { User } from "../../interfaces/graphql";

type ProjectCardProps = {
id: string;
Expand All @@ -39,7 +40,7 @@ type ProjectCardProps = {
users?: {
id: string;
name: string;
avatar?: string;
avatarUrl?: User["avatarUrl"];
}[];
checkList?: {
title: string;
Expand Down Expand Up @@ -278,7 +279,7 @@ export const ProjectCard = ({
key={user.id}
alt={user.name}
size="small"
src={user.avatar}
src={user.avatarUrl}
style={{
backgroundColor:
getRandomColorFromString(
Expand Down
3 changes: 1 addition & 2 deletions examples/app-crm/src/routes/scrumboard/kanban/list.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import {
HttpError,
useCreate,
useDelete,
useList,
useUpdate,
Expand Down Expand Up @@ -32,7 +31,7 @@ const taskFragment = [
checklist: ["title", "checked"],
},
{
users: ["id", "name"],
users: ["id", "name", "avatarUrl"],
},
{
comments: ["totalCount"],
Expand Down
29 changes: 24 additions & 5 deletions examples/app-crm/src/routes/scrumboard/sales/list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const dealsFragment = [
company: ["id", "name"],
},
{
dealOwner: ["id", "name"],
dealOwner: ["id", "name", "avatarUrl"],
},
];

Expand All @@ -46,7 +46,17 @@ export const SalesPage = () => {
},
meta: {
operation: "dealStages",
fields: ["id", "title"],
fields: [
"id",
"title",
{
dealsAggregate: [
{
sum: ["value"],
},
],
},
],
},
});

Expand Down Expand Up @@ -313,7 +323,10 @@ export const SalesPage = () => {
key={deal.id}
title={deal.title}
company={{ name: deal.company.name }}
user={{ name: deal.dealOwner.name }}
user={{
name: deal.dealOwner.name,
avatarUrl: deal.dealOwner.avatarUrl,
}}
date={deal.createdAt}
price={currencyNumber(deal.value || 0)}
/>
Expand Down Expand Up @@ -368,7 +381,10 @@ export const SalesPage = () => {
key={deal.id}
title={deal.title}
company={{ name: deal.company.name }}
user={{ name: deal.dealOwner.name }}
user={{
name: deal.dealOwner.name,
avatarUrl: deal.dealOwner.avatarUrl,
}}
date={deal.createdAt}
price={currencyNumber(deal.value || 0)}
variant="won"
Expand Down Expand Up @@ -415,7 +431,10 @@ export const SalesPage = () => {
key={deal.id}
title={deal.title}
company={{ name: deal.company.name }}
user={{ name: deal.dealOwner.name }}
user={{
name: deal.dealOwner.name,
avatarUrl: deal.dealOwner.avatarUrl,
}}
date={deal.createdAt}
price={currencyNumber(deal.value || 0)}
variant="lost"
Expand Down

0 comments on commit 4b5c45e

Please sign in to comment.