Skip to content

Commit

Permalink
feat(app-crm): project/sales kanban list view (#4831)
Browse files Browse the repository at this point in the history
* feat(app-crm): project canban list view

* feat(app-crm): add get color utils

* chore(app-crm): export from index

* fix(app-crm): get-color typo

* chore(app-crm): remove affix on kanban column

* chore(app-crm): performance improvements

* feat(app-crm): style improvements

* chore(app-crm): chore code structure

* feat(app-crm): style improvements

* feat(app-crm): style improvements

* feat(app-crm): add sales kanban card

* chore(app-crm): refactor file structure

* chore(app-crm): refactor file structure

* feat(app-crm): add won-lost drop area

* feat(app-crm): create and delete deal stage

* fix(app-crm): test

* feat(app-crm):  generate color from string for consistency

* feat(app-crm):  hide won area if not dragging

* feat(app-crm):  dont send request if stageid is same

* feat(app-crm):  add get name initials

* chore(kanban): fix scroll containers

* Revert "chore(kanban): fix scroll containers"

This reverts commit 992413f.

* feat: create crm kanban modals (#4832)

Co-authored-by: Ali Emir Şen <[email protected]>
Co-authored-by: Salih Özdemir <[email protected]>
Co-authored-by: Alican Erdurmaz <[email protected]>

* feat: add optimistic update to project kanban

* fix: remove antd space use flex for properly vertical align

* fix: invalidate issues

* feat: add optimistic update to sales kanban

* chore: update the types

* feat: add avatarUrl

* fix: add deals sum aggregate

* fix: avatars

---------

Co-authored-by: Ali Emir Şen <[email protected]>
Co-authored-by: Salih Özdemir <[email protected]>
  • Loading branch information
3 people authored Aug 22, 2023
1 parent 9630980 commit e227f40
Show file tree
Hide file tree
Showing 64 changed files with 3,546 additions and 98 deletions.
22 changes: 11 additions & 11 deletions examples/app-crm/index.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<!doctype html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>refine crm app</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/png" href="/refine_favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>refine crm app</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
13 changes: 10 additions & 3 deletions examples/app-crm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,23 @@
"version": "0.0.1",
"private": true,
"dependencies": {
"@ant-design/icons": "5.0.1",
"@dnd-kit/core": "^6.0.8",
"@dnd-kit/modifiers": "^6.0.1",
"@dnd-kit/sortable": "^7.0.2",
"@refinedev/antd": "^5.34.0",
"@refinedev/core": "^4.34.0",
"@refinedev/cli": "^2.7.6",
"@refinedev/react-router-v6": "^4.5.0",
"@refinedev/core": "^4.34.0",
"@refinedev/nestjs-query-graphql": "^0.0.1",
"@refinedev/react-router-v6": "^4.5.0",
"@tanstack/react-query-devtools": "^4.32.6",
"antd": "^5.0.5",
"classnames": "^2.3.2",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "^6.8.1",
"graphql-ws": "^5.9.1",
"@uiw/react-md-editor": "^3.19.5",
"recharts": "^2.7.3",
"dayjs": "^1.10.7"
},
Expand All @@ -35,9 +42,9 @@
"autoprefixer": "^10.4.1",
"cypress": "^12.11.0",
"eslint": "^8.24.0",
"prettier": "^2.7.1",
"postcss": "^8.1.4",
"postcss-nesting": "^12.0.1",
"prettier": "^2.7.1",
"typescript": "^4.7.4",
"vite": "^4.3.1",
"jest": "^29.3.1",
Expand Down
Binary file added examples/app-crm/public/refine_favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
46 changes: 38 additions & 8 deletions examples/app-crm/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { Refine, Authenticated } from "@refinedev/core";
import { ReactQueryDevtools } from "@tanstack/react-query-devtools";
import { notificationProvider, ErrorComponent } from "@refinedev/antd";
import dayjs from "dayjs";
import utc from "dayjs/plugin/utc";
import relativeTime from "dayjs/plugin/relativeTime";

import routerProvider, {
NavigateToResource,
Expand All @@ -27,7 +25,13 @@ import { UpdatePasswordPage } from "./routes/update-password";
import { DashboardPage } from "./routes/dashboard/index";

import { CalendarPageWrapper } from "./routes/calendar/wrapper";
import { KanbanPage } from "./routes/scrumboard/kanban";
import {
KanbanPage,
KanbanCreatePage,
KanbanEditPage,
KanbanCreateStage,
KanbanEditStage,
} from "./routes/scrumboard/kanban";
import { SalesPage } from "./routes/scrumboard/sales";
import { CompaniesPage } from "./routes/companies";
import { CompanyShowPage } from "./routes/companies/show";
Expand All @@ -44,10 +48,10 @@ import { CalendarShowPage } from "./routes/calendar/show";
import { CalendarEditPage } from "./routes/calendar/edit";
import { CalendarCreatePage } from "./routes/calendar/create";

import "./styles/index.css";
import "./utilities/init-dayjs";

dayjs.extend(utc);
dayjs.extend(relativeTime);
import "./styles/antd.css";
import "./styles/index.css";

const App: React.FC = () => {
return (
Expand Down Expand Up @@ -102,9 +106,34 @@ const App: React.FC = () => {
/>
</Route>
<Route path="/scrumboard" element={<Outlet />}>
<Route path="kanban" element={<KanbanPage />} />
<Route
path="kanban"
element={
<KanbanPage>
<Outlet />
</KanbanPage>
}
>
<Route
path="create"
element={<KanbanCreatePage />}
/>
<Route
path="edit/:id"
element={<KanbanEditPage />}
/>
<Route
path="stages/create"
element={<KanbanCreateStage />}
/>
<Route
path="stages/edit/:id"
element={<KanbanEditStage />}
/>
</Route>
<Route path="sales" element={<SalesPage />} />
</Route>

<Route path="/companies">
<Route index element={<CompaniesPage />} />
<Route
Expand Down Expand Up @@ -173,6 +202,7 @@ const App: React.FC = () => {
</Routes>
<UnsavedChangesNotifier />
<DocumentTitleHandler />
<ReactQueryDevtools />
</Refine>
</ConfigProvider>
</BrowserRouter>
Expand Down
Loading

0 comments on commit e227f40

Please sign in to comment.