@tulip-systems/create-app 0.12.2 → 0.12.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/templates/basic/package.json +5 -5
- package/dist/templates/code/package.json +33 -14
- package/dist/templates/code/public/fonts/neue-haas-grotesk/neue-haas-grotesk-black-italic.otf +0 -0
- package/dist/templates/code/public/fonts/neue-haas-grotesk/neue-haas-grotesk-black.otf +0 -0
- package/dist/templates/code/public/fonts/neue-haas-grotesk/neue-haas-grotesk-bold-italic.otf +0 -0
- package/dist/templates/code/public/fonts/neue-haas-grotesk/neue-haas-grotesk-bold.otf +0 -0
- package/dist/templates/code/public/fonts/neue-haas-grotesk/neue-haas-grotesk-extra-light-italic.otf +0 -0
- package/dist/templates/code/public/fonts/neue-haas-grotesk/neue-haas-grotesk-extra-light.otf +0 -0
- package/dist/templates/code/public/fonts/neue-haas-grotesk/neue-haas-grotesk-light-italic.otf +0 -0
- package/dist/templates/code/public/fonts/neue-haas-grotesk/neue-haas-grotesk-light.otf +0 -0
- package/dist/templates/code/public/fonts/neue-haas-grotesk/neue-haas-grotesk-medium-italic.otf +0 -0
- package/dist/templates/code/public/fonts/neue-haas-grotesk/neue-haas-grotesk-medium.otf +0 -0
- package/dist/templates/code/public/fonts/neue-haas-grotesk/neue-haas-grotesk-regular-italic.otf +0 -0
- package/dist/templates/code/public/fonts/neue-haas-grotesk/neue-haas-grotesk-regular.otf +0 -0
- package/dist/templates/code/public/fonts/neue-haas-grotesk/neue-haas-grotesk-thin-italic.otf +0 -0
- package/dist/templates/code/public/fonts/neue-haas-grotesk/neue-haas-grotesk-thin.otf +0 -0
- package/dist/templates/code/public/fonts/neue-haas-grotesk/neue-haas-grotesk-ultra-thin-italic.otf +0 -0
- package/dist/templates/code/public/fonts/neue-haas-grotesk/neue-haas-grotesk-ultra-thin.otf +0 -0
- package/dist/templates/code/public/images/preview/hero-home.webp +0 -0
- package/dist/templates/code/src/app/admin/customers/[id]/(default)/@dashboard/page.tsx +2 -0
- package/dist/templates/code/src/app/admin/projects/[id]/(default)/page.tsx +2 -0
- package/dist/templates/code/src/app/admin/prospects/[id]/(default)/@dashboard/page.tsx +2 -0
- package/dist/templates/code/src/app/admin/quotations/(list)/layout.tsx +24 -0
- package/dist/templates/code/src/app/admin/quotations/(list)/page.tsx +23 -0
- package/dist/templates/code/src/app/admin/quotations/[id]/(dashboard)/layout.tsx +40 -0
- package/dist/templates/code/src/app/admin/quotations/[id]/(dashboard)/page.tsx +56 -0
- package/dist/templates/code/src/app/admin/quotations/[id]/preview/page.tsx +17 -0
- package/dist/templates/code/src/app/admin/quotations/_blocks/commands.tsx +24 -0
- package/dist/templates/code/src/app/admin/quotations/_blocks/hero/config.ts +14 -0
- package/dist/templates/code/src/app/admin/quotations/_blocks/hero/create.tsx +152 -0
- package/dist/templates/code/src/app/admin/quotations/_blocks/hero/inline.tsx +90 -0
- package/dist/templates/code/src/app/admin/quotations/_blocks/hero/preview.tsx +90 -0
- package/dist/templates/code/src/app/admin/quotations/_blocks/registry.ts +13 -0
- package/dist/templates/code/src/app/admin/quotations/_blocks/render.tsx +190 -0
- package/dist/templates/code/src/app/admin/quotations/_blocks/styles.ts +24 -0
- package/dist/templates/code/src/app/admin/quotations/_blocks/summary/config.ts +13 -0
- package/dist/templates/code/src/app/admin/quotations/_blocks/summary/create.tsx +175 -0
- package/dist/templates/code/src/app/admin/quotations/_blocks/summary/inline.tsx +93 -0
- package/dist/templates/code/src/app/admin/quotations/_blocks/summary/preview.tsx +25 -0
- package/dist/templates/code/src/app/admin/quotations/_blocks/totals/config.ts +18 -0
- package/dist/templates/code/src/app/admin/quotations/_blocks/totals/create.tsx +177 -0
- package/dist/templates/code/src/app/admin/quotations/_blocks/totals/inline.tsx +96 -0
- package/dist/templates/code/src/app/admin/quotations/_blocks/totals/preview.tsx +32 -0
- package/dist/templates/code/src/app/admin/quotations/_components/create-command.tsx +97 -0
- package/dist/templates/code/src/app/admin/quotations/_components/tables.tsx +68 -0
- package/dist/templates/code/src/app/admin/quotations/_components/toolbars.tsx +18 -0
- package/dist/templates/code/src/app/admin/quotations/_config/columns-data.tsx +35 -0
- package/dist/templates/code/src/app/admin/quotations/_config/commands.tsx +71 -0
- package/dist/templates/code/src/app/admin/quotations/_config/filters.ts +22 -0
- package/dist/templates/code/src/app/admin/quotations/_config/sorting.ts +23 -0
- package/dist/templates/code/src/app/admin/quotations/_lib/router.ts +260 -0
- package/dist/templates/code/src/app/admin/quotations/_lib/schema.ts +42 -0
- package/dist/templates/code/src/app/admin/quotations/_lib/validators.ts +20 -0
- package/dist/templates/code/src/app/admin/tasks/[id]/(default)/@dashboard/page.tsx +6 -4
- package/dist/templates/code/src/lib/config/editor.ts +54 -0
- package/dist/templates/code/src/lib/config/paths.tsx +8 -0
- package/dist/templates/code/src/lib/utils/fonts.ts +102 -0
- package/dist/templates/code/src/server/auth/permissions.ts +4 -0
- package/dist/templates/code/src/server/db/schema.ts +1 -0
- package/dist/templates/code/src/server/router/router.ts +10 -0
- package/dist/templates/spark/package.json +30 -13
- package/dist/templates/spark/src/app/admin/assignments/[id]/(default)/@dashboard/page.tsx +2 -0
- package/dist/templates/spark/src/app/admin/companies/[id]/(default)/@dashboard/page.tsx +2 -0
- package/dist/templates/spark/src/app/admin/customers/[id]/(default)/@dashboard/page.tsx +2 -0
- package/dist/templates/spark/src/app/admin/emails/_components/send-email.tsx +5 -6
- package/dist/templates/spark/src/app/admin/executions/[id]/@dashboard/page.tsx +2 -0
- package/dist/templates/spark/src/app/admin/products/[id]/(preview)/page.tsx +2 -2
- package/dist/templates/spark/src/app/admin/products/[id]/dashboard/@dashboard/page.tsx +2 -0
- package/dist/templates/spark/src/app/admin/products/[id]/dashboard/editor/page.tsx +6 -8
- package/dist/templates/spark/src/app/admin/projects/[id]/(dashboard)/page.tsx +2 -0
- package/dist/templates/spark/src/app/admin/projects/[id]/messages/page.tsx +7 -1
- package/dist/templates/spark/src/app/admin/purchase-orders/[id]/(default)/@dashboard/page.tsx +2 -0
- package/dist/templates/spark/src/app/admin/purchase-orders/_config/columns-data.tsx +7 -1
- package/dist/templates/spark/src/app/admin/quotation-items/_config/columns-data.tsx +7 -1
- package/dist/templates/spark/src/app/admin/quotation-items/_config/columns-inline.tsx +2 -0
- package/dist/templates/spark/src/app/admin/quotations/[id]/(default)/@dashboard/page.tsx +2 -0
- package/dist/templates/spark/src/app/admin/run-tasks/_config/columns-data.tsx +7 -1
- package/dist/templates/spark/src/app/admin/runs/[id]/@dashboard/page.tsx +2 -0
- package/dist/templates/spark/src/app/admin/runs/[id]/reports/page.tsx +2 -0
- package/dist/templates/spark/src/app/admin/sales-invoice-items/_config/columns-data.tsx +7 -1
- package/dist/templates/spark/src/app/admin/sales-invoice-items/_config/columns-inline.tsx +2 -0
- package/dist/templates/spark/src/app/admin/sales-order-items/_config/columns-data.tsx +7 -1
- package/dist/templates/spark/src/app/admin/sales-order-items/_config/columns-inline.tsx +2 -0
- package/dist/templates/spark/src/app/admin/sales-orders/[id]/(default)/@dashboard/page.tsx +2 -0
- package/dist/templates/spark/src/app/admin/suppliers/[id]/@dashboard/page.tsx +2 -0
- package/dist/templates/spark/src/app/admin/tasks/_config/columns-data.tsx +7 -1
- package/dist/templates/spark/src/app/admin/tasks/_config/columns-inline.tsx +2 -0
- package/dist/templates/spark/src/app/admin/technical-sheets/[id]/page.tsx +2 -0
- package/dist/templates/spark/src/app/admin/technical-sheets/_config/columns-data.tsx +13 -2
- package/dist/templates/spark/src/app/admin/template-tasks/_config/columns-data.tsx +7 -1
- package/dist/templates/spark/src/app/admin/template-tasks/_config/columns-inline.tsx +2 -0
- package/dist/templates/spark/src/app/admin/templates/[id]/@dashboard/page.tsx +2 -0
- package/dist/templates/spark/src/lib/config/editor.ts +54 -0
- package/package.json +1 -1
|
@@ -21,6 +21,7 @@ import { DataList, DataListItem, DataListTitle, DataListValue } from "@tulip-sys
|
|
|
21
21
|
import { notFound } from "next/navigation";
|
|
22
22
|
import { use } from "react";
|
|
23
23
|
import { VAT_RATES } from "@/app/admin/clients/_lib/constants";
|
|
24
|
+
import { richTextEditorPreset } from "@/lib/config/editor";
|
|
24
25
|
import { orpc } from "@/server/router/client";
|
|
25
26
|
import { updateCompanySchema } from "../../../_lib/validators";
|
|
26
27
|
|
|
@@ -227,6 +228,7 @@ export default function CustomerDetailPage(props: { params: Promise<{ id: string
|
|
|
227
228
|
validate: { change: updateCompanySchema.shape.notes.unwrap() },
|
|
228
229
|
}}
|
|
229
230
|
className="min-h-40"
|
|
231
|
+
extensions={richTextEditorPreset}
|
|
230
232
|
>
|
|
231
233
|
<EditorMenuBubble />
|
|
232
234
|
<EditorContent />
|
|
@@ -21,6 +21,7 @@ import { notFound } from "next/navigation";
|
|
|
21
21
|
import { use } from "react";
|
|
22
22
|
import { z } from "zod";
|
|
23
23
|
import { VAT_RATES } from "@/app/admin/clients/_lib/constants";
|
|
24
|
+
import { richTextEditorPreset } from "@/lib/config/editor";
|
|
24
25
|
import { orpc } from "@/server/router/client";
|
|
25
26
|
|
|
26
27
|
export default function CustomerDetailPage(props: { params: Promise<{ id: string }> }) {
|
|
@@ -151,6 +152,7 @@ export default function CustomerDetailPage(props: { params: Promise<{ id: string
|
|
|
151
152
|
validate: { change: z.any() },
|
|
152
153
|
}}
|
|
153
154
|
className="min-h-40"
|
|
155
|
+
extensions={richTextEditorPreset}
|
|
154
156
|
>
|
|
155
157
|
<EditorMenuBubble />
|
|
156
158
|
<EditorContent />
|
|
@@ -31,6 +31,7 @@ import { notFound, useRouter } from "next/navigation";
|
|
|
31
31
|
import { createContext, type PropsWithChildren, Suspense, use, useState } from "react";
|
|
32
32
|
import { z } from "zod";
|
|
33
33
|
import { Icons } from "@/components/icons";
|
|
34
|
+
import { richTextEditorPreset } from "@/lib/config/editor";
|
|
34
35
|
import { orpc } from "@/server/router/client";
|
|
35
36
|
import type { RouterOutputs } from "@/server/router/router";
|
|
36
37
|
import { uploadClient } from "@/server/storage/client";
|
|
@@ -44,6 +45,9 @@ type SendEmailFormContextType = {
|
|
|
44
45
|
};
|
|
45
46
|
|
|
46
47
|
const SendEmailFormContext = createContext({} as SendEmailFormContextType);
|
|
48
|
+
const emailEditorPreset = richTextEditorPreset.filter(
|
|
49
|
+
(extension) => !["highlight", "color", "horizontalRule", "blockquote"].includes(extension.name),
|
|
50
|
+
);
|
|
47
51
|
|
|
48
52
|
/**
|
|
49
53
|
* Send email form
|
|
@@ -197,12 +201,7 @@ export function SendEmailFormBody() {
|
|
|
197
201
|
}}
|
|
198
202
|
className="min-h-120"
|
|
199
203
|
disabled={data.status !== "draft"}
|
|
200
|
-
extensions={
|
|
201
|
-
highlight: false,
|
|
202
|
-
color: false,
|
|
203
|
-
horizontalRule: false,
|
|
204
|
-
blockquote: false,
|
|
205
|
-
}}
|
|
204
|
+
extensions={emailEditorPreset}
|
|
206
205
|
>
|
|
207
206
|
{data.status === "draft" && <EditorMenuFixed />}
|
|
208
207
|
<EditorContent />
|
|
@@ -22,6 +22,7 @@ import { use } from "react";
|
|
|
22
22
|
import { z } from "zod";
|
|
23
23
|
import { generateClientHref } from "@/app/admin/clients/_lib/helpers";
|
|
24
24
|
import { calculateTotalDuration } from "@/app/admin/registrations/_lib/helpers";
|
|
25
|
+
import { richTextEditorPreset } from "@/lib/config/editor";
|
|
25
26
|
import { orpc } from "@/server/router/client";
|
|
26
27
|
import { ExecutionStatusField } from "../../_config/status";
|
|
27
28
|
|
|
@@ -98,6 +99,7 @@ export default function Page(props: PageProps<"/admin/executions/[id]">) {
|
|
|
98
99
|
validate: { change: z.any() },
|
|
99
100
|
}}
|
|
100
101
|
className="min-h-24"
|
|
102
|
+
extensions={richTextEditorPreset}
|
|
101
103
|
>
|
|
102
104
|
<EditorMenuBubble />
|
|
103
105
|
<EditorContent />
|
|
@@ -4,7 +4,6 @@ import { useSuspenseQueries } from "@tanstack/react-query";
|
|
|
4
4
|
import { Allowed } from "@tulip-systems/auth/permissions/client";
|
|
5
5
|
import { getLocalDriveFileUrl } from "@tulip-systems/drive-local";
|
|
6
6
|
import { Editor, EditorContent } from "@tulip-systems/editor/client";
|
|
7
|
-
import { createStorageEditorExtensions } from "@tulip-systems/editor-storage/client";
|
|
8
7
|
import {
|
|
9
8
|
Accordion,
|
|
10
9
|
AccordionContent,
|
|
@@ -16,6 +15,7 @@ import { Separator } from "@tulip-systems/ui/separator";
|
|
|
16
15
|
import Link from "next/link";
|
|
17
16
|
import { notFound } from "next/navigation";
|
|
18
17
|
import { use } from "react";
|
|
18
|
+
import { richTextEditorPreset } from "@/lib/config/editor";
|
|
19
19
|
import { orpc } from "@/server/router/client";
|
|
20
20
|
import { ImageCarousel } from "../../_components/image-carousel";
|
|
21
21
|
|
|
@@ -89,7 +89,7 @@ export default function ProductDetailPage(props: PageProps<"/admin/products/[id]
|
|
|
89
89
|
|
|
90
90
|
<Editor
|
|
91
91
|
value={productQuery.data.content ?? undefined}
|
|
92
|
-
extensions={
|
|
92
|
+
extensions={richTextEditorPreset}
|
|
93
93
|
variant="preview"
|
|
94
94
|
disabled
|
|
95
95
|
>
|
|
@@ -16,6 +16,7 @@ import { DataStackColumn, DataStackLayout, DataStackRow } from "@tulip-systems/u
|
|
|
16
16
|
import { notFound } from "next/navigation";
|
|
17
17
|
import { use } from "react";
|
|
18
18
|
import { z } from "zod";
|
|
19
|
+
import { richTextEditorPreset } from "@/lib/config/editor";
|
|
19
20
|
import { orpc } from "@/server/router/client";
|
|
20
21
|
|
|
21
22
|
export default function DetailPage(props: PageProps<"/admin/products/[id]/dashboard">) {
|
|
@@ -116,6 +117,7 @@ export default function DetailPage(props: PageProps<"/admin/products/[id]/dashbo
|
|
|
116
117
|
validate: { change: z.any() },
|
|
117
118
|
}}
|
|
118
119
|
className="min-h-24"
|
|
120
|
+
extensions={richTextEditorPreset}
|
|
119
121
|
>
|
|
120
122
|
<EditorMenuBubble />
|
|
121
123
|
<EditorContent />
|
|
@@ -3,15 +3,13 @@
|
|
|
3
3
|
import { useSuspenseQuery } from "@tanstack/react-query";
|
|
4
4
|
import { Allowed } from "@tulip-systems/auth/permissions/client";
|
|
5
5
|
import { EditorContent, EditorMenuFixed } from "@tulip-systems/editor/client";
|
|
6
|
-
import {
|
|
7
|
-
createFileHandlerUploadStrategy,
|
|
8
|
-
createStorageEditorExtensions,
|
|
9
|
-
} from "@tulip-systems/editor-storage/client";
|
|
6
|
+
import { StorageUploadExtension } from "@tulip-systems/editor-storage/client";
|
|
10
7
|
import { InlineEditor, InlineField, InlineFieldError } from "@tulip-systems/inline/client";
|
|
11
8
|
import { toast } from "@tulip-systems/ui/sonner";
|
|
12
9
|
import { notFound } from "next/navigation";
|
|
13
10
|
import { use } from "react";
|
|
14
11
|
import { z } from "zod";
|
|
12
|
+
import { richTextEditorPreset } from "@/lib/config/editor";
|
|
15
13
|
import { orpc } from "@/server/router/client";
|
|
16
14
|
import { uploadClient } from "@/server/storage/client";
|
|
17
15
|
|
|
@@ -30,9 +28,9 @@ export default function Page(props: PageProps<"/admin/products/[id]/dashboard/ed
|
|
|
30
28
|
variables={(value) => ({ id, data: { content: value } })}
|
|
31
29
|
mutation={orpc.products.update.mutationOptions()}
|
|
32
30
|
className="min-h-64"
|
|
33
|
-
extensions={
|
|
34
|
-
...
|
|
35
|
-
|
|
31
|
+
extensions={[
|
|
32
|
+
...richTextEditorPreset,
|
|
33
|
+
StorageUploadExtension.configure({
|
|
36
34
|
allowedMimeTypes: ["image/png", "image/jpeg", "image/gif", "image/webp"],
|
|
37
35
|
variables: {},
|
|
38
36
|
uploadClient,
|
|
@@ -46,7 +44,7 @@ export default function Page(props: PageProps<"/admin/products/[id]/dashboard/ed
|
|
|
46
44
|
});
|
|
47
45
|
},
|
|
48
46
|
}),
|
|
49
|
-
}
|
|
47
|
+
]}
|
|
50
48
|
strategy={{
|
|
51
49
|
mutate: { on: "change", debounceMs: 700 },
|
|
52
50
|
validate: { change: z.any() },
|
|
@@ -25,6 +25,7 @@ import { use } from "react";
|
|
|
25
25
|
import { z } from "zod";
|
|
26
26
|
import { generateClientHref } from "@/app/admin/clients/_lib/helpers";
|
|
27
27
|
import { Icons } from "@/components/icons";
|
|
28
|
+
import { richTextEditorPreset } from "@/lib/config/editor";
|
|
28
29
|
import { orpc } from "@/server/router/client";
|
|
29
30
|
|
|
30
31
|
const toInlineDateValue = (value: Date | string | null | undefined): string | null => {
|
|
@@ -228,6 +229,7 @@ export default function ProjectDetailPage(props: PageProps<"/admin/projects/[id]
|
|
|
228
229
|
validate: { change: z.any() },
|
|
229
230
|
}}
|
|
230
231
|
className="min-h-40"
|
|
232
|
+
extensions={richTextEditorPreset}
|
|
231
233
|
>
|
|
232
234
|
<EditorMenuBubble />
|
|
233
235
|
<EditorContent />
|
|
@@ -19,6 +19,7 @@ import {
|
|
|
19
19
|
import Link from "next/link";
|
|
20
20
|
import { use, useDeferredValue, useMemo } from "react";
|
|
21
21
|
import { runsFilters } from "@/app/admin/runs/_config/filters";
|
|
22
|
+
import { richTextEditorPreset } from "@/lib/config/editor";
|
|
22
23
|
import { orpc } from "@/server/router/client";
|
|
23
24
|
|
|
24
25
|
export default function ProjectDetailPage(props: PageProps<"/admin/projects/[id]/messages">) {
|
|
@@ -62,7 +63,12 @@ export default function ProjectDetailPage(props: PageProps<"/admin/projects/[id]
|
|
|
62
63
|
</CardHeader>
|
|
63
64
|
|
|
64
65
|
<CardContent>
|
|
65
|
-
<Editor
|
|
66
|
+
<Editor
|
|
67
|
+
value={message ?? undefined}
|
|
68
|
+
variant="preview"
|
|
69
|
+
disabled
|
|
70
|
+
extensions={richTextEditorPreset}
|
|
71
|
+
>
|
|
66
72
|
<EditorContent />
|
|
67
73
|
</Editor>
|
|
68
74
|
</CardContent>
|
package/dist/templates/spark/src/app/admin/purchase-orders/[id]/(default)/@dashboard/page.tsx
CHANGED
|
@@ -16,6 +16,7 @@ import { notFound } from "next/navigation";
|
|
|
16
16
|
import { use } from "react";
|
|
17
17
|
import { z } from "zod";
|
|
18
18
|
import { Icons } from "@/components/icons";
|
|
19
|
+
import { richTextEditorPreset } from "@/lib/config/editor";
|
|
19
20
|
import { orpc } from "@/server/router/client";
|
|
20
21
|
|
|
21
22
|
export default function DetailPage(props: PageProps<"/admin/purchase-orders/[id]">) {
|
|
@@ -97,6 +98,7 @@ export default function DetailPage(props: PageProps<"/admin/purchase-orders/[id]
|
|
|
97
98
|
mutation={orpc.purchaseOrders.update.mutationOptions()}
|
|
98
99
|
strategy={{ mutate: { on: "change", debounceMs: 700 }, validate: { change: z.any() } }}
|
|
99
100
|
className="min-h-24"
|
|
101
|
+
extensions={richTextEditorPreset}
|
|
100
102
|
>
|
|
101
103
|
<EditorMenuBubble />
|
|
102
104
|
<EditorContent />
|
|
@@ -6,6 +6,7 @@ import { createTableSelectCell } from "@tulip-systems/data-tables/client";
|
|
|
6
6
|
import { Editor, EditorContent } from "@tulip-systems/editor/client";
|
|
7
7
|
import Link from "next/link";
|
|
8
8
|
import { Fragment } from "react";
|
|
9
|
+
import { richTextEditorPreset } from "@/lib/config/editor";
|
|
9
10
|
import { EmailStatusField } from "../../emails/_config/status";
|
|
10
11
|
import type { Project } from "../../projects/_lib/validators";
|
|
11
12
|
import type { PurchaseOrderItem } from "../../purchase-order-items/_lib/validators";
|
|
@@ -39,7 +40,12 @@ export const purchaseOrderColumns: TableColumnDef<PurchaseOrderColumn>[] = [
|
|
|
39
40
|
header: ({ column }) => <TableColumnHeader column={column} title="Notitie" />,
|
|
40
41
|
cell: ({ row }) => (
|
|
41
42
|
<TableCell className="line-clamp-1 max-w-[500px] truncate">
|
|
42
|
-
<Editor
|
|
43
|
+
<Editor
|
|
44
|
+
value={row.original.notes}
|
|
45
|
+
variant="preview"
|
|
46
|
+
disabled
|
|
47
|
+
extensions={richTextEditorPreset}
|
|
48
|
+
>
|
|
43
49
|
<EditorContent />
|
|
44
50
|
</Editor>
|
|
45
51
|
</TableCell>
|
|
@@ -4,6 +4,7 @@ import { formatCurrency } from "@tulip-systems/core";
|
|
|
4
4
|
import { TableCell, type TableColumnDef, TableColumnHeader } from "@tulip-systems/data-tables";
|
|
5
5
|
import { createTableSelectCell } from "@tulip-systems/data-tables/client";
|
|
6
6
|
import { Editor, EditorContent } from "@tulip-systems/editor/client";
|
|
7
|
+
import { richTextEditorPreset } from "@/lib/config/editor";
|
|
7
8
|
import type { QuotationItemTableData } from "../_components/tables";
|
|
8
9
|
|
|
9
10
|
export const quotationItemColumns: TableColumnDef<QuotationItemTableData>[] = [
|
|
@@ -18,7 +19,12 @@ export const quotationItemColumns: TableColumnDef<QuotationItemTableData>[] = [
|
|
|
18
19
|
header: ({ column }) => <TableColumnHeader column={column} title="Omschrijving" />,
|
|
19
20
|
cell: ({ row }) => (
|
|
20
21
|
<TableCell>
|
|
21
|
-
<Editor
|
|
22
|
+
<Editor
|
|
23
|
+
value={row.getValue("description") ?? undefined}
|
|
24
|
+
variant="preview"
|
|
25
|
+
disabled
|
|
26
|
+
extensions={richTextEditorPreset}
|
|
27
|
+
>
|
|
22
28
|
<EditorContent />
|
|
23
29
|
</Editor>
|
|
24
30
|
</TableCell>
|
|
@@ -17,6 +17,7 @@ import {
|
|
|
17
17
|
InlineTableCellError,
|
|
18
18
|
} from "@tulip-systems/inline/client";
|
|
19
19
|
import { z } from "zod";
|
|
20
|
+
import { richTextEditorPreset } from "@/lib/config/editor";
|
|
20
21
|
import { orpc } from "@/server/router/client";
|
|
21
22
|
import type { QuotationItemTableData } from "../_components/tables";
|
|
22
23
|
|
|
@@ -58,6 +59,7 @@ export const quotationItemInlineColumns: TableColumnDef<QuotationItemTableData>[
|
|
|
58
59
|
strategy={{ mutate: { on: "change", debounceMs: 700 }, validate: { change: z.any() } }}
|
|
59
60
|
variant="table"
|
|
60
61
|
permission={{ quotation: ["update"] }}
|
|
62
|
+
extensions={richTextEditorPreset}
|
|
61
63
|
>
|
|
62
64
|
<EditorMenuBubble />
|
|
63
65
|
<EditorContent />
|
|
@@ -24,6 +24,7 @@ import { use } from "react";
|
|
|
24
24
|
import { z } from "zod";
|
|
25
25
|
import { generateClientHref } from "@/app/admin/clients/_lib/helpers";
|
|
26
26
|
import { Icons } from "@/components/icons";
|
|
27
|
+
import { richTextEditorPreset } from "@/lib/config/editor";
|
|
27
28
|
import { orpc } from "@/server/router/client";
|
|
28
29
|
|
|
29
30
|
const toInlineDateValue = (value: Date | string | null | undefined): string | null => {
|
|
@@ -137,6 +138,7 @@ export default function DetailPage(props: PageProps<"/admin/quotations/[id]">) {
|
|
|
137
138
|
validate: { change: z.any() },
|
|
138
139
|
}}
|
|
139
140
|
className="min-h-24"
|
|
141
|
+
extensions={richTextEditorPreset}
|
|
140
142
|
>
|
|
141
143
|
<EditorMenuBubble />
|
|
142
144
|
<EditorContent />
|
|
@@ -4,6 +4,7 @@ import { TableCell, type TableColumnDef, TableColumnHeader } from "@tulip-system
|
|
|
4
4
|
import { createTableSelectCell } from "@tulip-systems/data-tables/client";
|
|
5
5
|
import { Editor, EditorContent } from "@tulip-systems/editor/client";
|
|
6
6
|
import Link from "next/link";
|
|
7
|
+
import { richTextEditorPreset } from "@/lib/config/editor";
|
|
7
8
|
import { TaskStatusField } from "../../tasks/_config/status";
|
|
8
9
|
import type { RunTaskTableData } from "../_components/tables";
|
|
9
10
|
|
|
@@ -22,7 +23,12 @@ export const runTaskTableColumns: TableColumnDef<RunTaskTableData>[] = [
|
|
|
22
23
|
accessorFn: (row) => row.task.description,
|
|
23
24
|
cell: ({ row }) => (
|
|
24
25
|
<TableCell className="w-full min-w-80">
|
|
25
|
-
<Editor
|
|
26
|
+
<Editor
|
|
27
|
+
value={row.getValue("description")}
|
|
28
|
+
variant="preview"
|
|
29
|
+
disabled
|
|
30
|
+
extensions={richTextEditorPreset}
|
|
31
|
+
>
|
|
26
32
|
<EditorContent />
|
|
27
33
|
</Editor>
|
|
28
34
|
</TableCell>
|
|
@@ -22,6 +22,7 @@ import { z } from "zod";
|
|
|
22
22
|
import { EmployeeAvatars, EmployeeAvatarsLoading } from "@/app/admin/employees/_components/avatars";
|
|
23
23
|
import { calculateTotalDuration } from "@/app/admin/registrations/_lib/helpers";
|
|
24
24
|
import { Icons } from "@/components/icons";
|
|
25
|
+
import { richTextEditorPreset } from "@/lib/config/editor";
|
|
25
26
|
import { orpc } from "@/server/router/client";
|
|
26
27
|
|
|
27
28
|
export default function RunDetailPage(props: PageProps<"/admin/runs/[id]">) {
|
|
@@ -94,6 +95,7 @@ export default function RunDetailPage(props: PageProps<"/admin/runs/[id]">) {
|
|
|
94
95
|
validate: { change: z.any() },
|
|
95
96
|
}}
|
|
96
97
|
className="min-h-24"
|
|
98
|
+
extensions={richTextEditorPreset}
|
|
97
99
|
>
|
|
98
100
|
<EditorMenuBubble />
|
|
99
101
|
<EditorContent />
|
|
@@ -19,6 +19,7 @@ import { RunTaskInfiniteTableProvider } from "@/app/admin/run-tasks/_components/
|
|
|
19
19
|
import { RunTaskTableToolbar } from "@/app/admin/run-tasks/_components/toolbars";
|
|
20
20
|
import { runTaskTableColumns } from "@/app/admin/run-tasks/_config/columns-data";
|
|
21
21
|
import { runTaskDeleteCommand, runTaskResetCommand } from "@/app/admin/run-tasks/_config/commands";
|
|
22
|
+
import { richTextEditorPreset } from "@/lib/config/editor";
|
|
22
23
|
import { orpc } from "@/server/router/client";
|
|
23
24
|
|
|
24
25
|
export default function RunDetailPage(props: PageProps<"/admin/runs/[id]/reports">) {
|
|
@@ -39,6 +40,7 @@ export default function RunDetailPage(props: PageProps<"/admin/runs/[id]/reports
|
|
|
39
40
|
mutation={orpc.runs.update.mutationOptions()}
|
|
40
41
|
strategy={{ mutate: { on: "change", debounceMs: 700 }, validate: { change: z.any() } }}
|
|
41
42
|
className="min-h-24"
|
|
43
|
+
extensions={richTextEditorPreset}
|
|
42
44
|
>
|
|
43
45
|
<EditorMenuBubble />
|
|
44
46
|
<EditorContent />
|
|
@@ -4,6 +4,7 @@ import { formatCurrency } from "@tulip-systems/core";
|
|
|
4
4
|
import { TableCell, type TableColumnDef, TableColumnHeader } from "@tulip-systems/data-tables";
|
|
5
5
|
import { createTableSelectCell } from "@tulip-systems/data-tables/client";
|
|
6
6
|
import { Editor, EditorContent } from "@tulip-systems/editor/client";
|
|
7
|
+
import { richTextEditorPreset } from "@/lib/config/editor";
|
|
7
8
|
import { VAT_RATES } from "../../clients/_lib/constants";
|
|
8
9
|
import type { SalesInvoiceItemTableData } from "../_components/tables";
|
|
9
10
|
|
|
@@ -19,7 +20,12 @@ export const salesInvoiceItemColumns: TableColumnDef<SalesInvoiceItemTableData>[
|
|
|
19
20
|
header: ({ column }) => <TableColumnHeader column={column} title="Omschrijving" />,
|
|
20
21
|
cell: ({ row }) => (
|
|
21
22
|
<TableCell>
|
|
22
|
-
<Editor
|
|
23
|
+
<Editor
|
|
24
|
+
value={row.getValue("description") ?? undefined}
|
|
25
|
+
variant="preview"
|
|
26
|
+
disabled
|
|
27
|
+
extensions={richTextEditorPreset}
|
|
28
|
+
>
|
|
23
29
|
<EditorContent />
|
|
24
30
|
</Editor>
|
|
25
31
|
</TableCell>
|
|
@@ -19,6 +19,7 @@ import {
|
|
|
19
19
|
InlineTableCellError,
|
|
20
20
|
} from "@tulip-systems/inline/client";
|
|
21
21
|
import { z } from "zod";
|
|
22
|
+
import { richTextEditorPreset } from "@/lib/config/editor";
|
|
22
23
|
import { orpc } from "@/server/router/client";
|
|
23
24
|
import { vatRateComboboxOptions } from "../../clients/_lib/constants";
|
|
24
25
|
import type { SalesInvoiceItemTableData } from "../_components/tables";
|
|
@@ -58,6 +59,7 @@ export const salesInvoiceItemInlineColumns: TableColumnDef<SalesInvoiceItemTable
|
|
|
58
59
|
strategy={{ mutate: { on: "change", debounceMs: 700 }, validate: { change: z.any() } }}
|
|
59
60
|
variant="table"
|
|
60
61
|
permission={{ salesOrder: ["update"] }}
|
|
62
|
+
extensions={richTextEditorPreset}
|
|
61
63
|
>
|
|
62
64
|
<EditorContent />
|
|
63
65
|
</InlineEditor>
|
|
@@ -4,6 +4,7 @@ import { formatCurrency } from "@tulip-systems/core";
|
|
|
4
4
|
import { TableCell, type TableColumnDef, TableColumnHeader } from "@tulip-systems/data-tables";
|
|
5
5
|
import { createTableSelectCell } from "@tulip-systems/data-tables/client";
|
|
6
6
|
import { Editor, EditorContent } from "@tulip-systems/editor/client";
|
|
7
|
+
import { richTextEditorPreset } from "@/lib/config/editor";
|
|
7
8
|
import type { SalesOrderItemTableData } from "../_components/tables";
|
|
8
9
|
|
|
9
10
|
export const salesOrderItemColumns: TableColumnDef<SalesOrderItemTableData>[] = [
|
|
@@ -18,7 +19,12 @@ export const salesOrderItemColumns: TableColumnDef<SalesOrderItemTableData>[] =
|
|
|
18
19
|
header: ({ column }) => <TableColumnHeader column={column} title="Omschrijving" />,
|
|
19
20
|
cell: ({ row }) => (
|
|
20
21
|
<TableCell>
|
|
21
|
-
<Editor
|
|
22
|
+
<Editor
|
|
23
|
+
value={row.getValue("description") ?? undefined}
|
|
24
|
+
variant="preview"
|
|
25
|
+
disabled
|
|
26
|
+
extensions={richTextEditorPreset}
|
|
27
|
+
>
|
|
22
28
|
<EditorContent />
|
|
23
29
|
</Editor>
|
|
24
30
|
</TableCell>
|
|
@@ -20,6 +20,7 @@ import {
|
|
|
20
20
|
InlineTableCellError,
|
|
21
21
|
} from "@tulip-systems/inline/client";
|
|
22
22
|
import { z } from "zod";
|
|
23
|
+
import { richTextEditorPreset } from "@/lib/config/editor";
|
|
23
24
|
import { orpc } from "@/server/router/client";
|
|
24
25
|
import { vatRateComboboxOptions } from "../../clients/_lib/constants";
|
|
25
26
|
import type { SalesOrderItemTableData } from "../_components/tables";
|
|
@@ -63,6 +64,7 @@ export const salesOrderItemInlineColumns: TableColumnDef<SalesOrderItemTableData
|
|
|
63
64
|
variant="table"
|
|
64
65
|
permission={{ salesOrder: ["update"] }}
|
|
65
66
|
disabled={row.original.associated.length > 0}
|
|
67
|
+
extensions={richTextEditorPreset}
|
|
66
68
|
>
|
|
67
69
|
<EditorMenuBubble />
|
|
68
70
|
<EditorContent />
|
|
@@ -20,6 +20,7 @@ import { use } from "react";
|
|
|
20
20
|
import { z } from "zod";
|
|
21
21
|
import { generateClientHref } from "@/app/admin/clients/_lib/helpers";
|
|
22
22
|
import { Icons } from "@/components/icons";
|
|
23
|
+
import { richTextEditorPreset } from "@/lib/config/editor";
|
|
23
24
|
import { orpc } from "@/server/router/client";
|
|
24
25
|
import { SalesOrderRatioTypeField } from "../../../_config/ratio-type";
|
|
25
26
|
|
|
@@ -95,6 +96,7 @@ export default function DetailPage(props: PageProps<"/admin/sales-orders/[id]">)
|
|
|
95
96
|
mutation={orpc.salesOrders.update.mutationOptions()}
|
|
96
97
|
strategy={{ mutate: { on: "change", debounceMs: 700 }, validate: { change: z.any() } }}
|
|
97
98
|
className="min-h-24"
|
|
99
|
+
extensions={richTextEditorPreset}
|
|
98
100
|
>
|
|
99
101
|
<EditorMenuBubble />
|
|
100
102
|
<EditorContent />
|
|
@@ -13,6 +13,7 @@ import { DataList, DataListItem, DataListTitle, DataListValue } from "@tulip-sys
|
|
|
13
13
|
import { notFound } from "next/navigation";
|
|
14
14
|
import { use } from "react";
|
|
15
15
|
import { z } from "zod";
|
|
16
|
+
import { richTextEditorPreset } from "@/lib/config/editor";
|
|
16
17
|
import { orpc } from "@/server/router/client";
|
|
17
18
|
|
|
18
19
|
export default function DetailPage(props: PageProps<"/admin/suppliers/[id]">) {
|
|
@@ -130,6 +131,7 @@ export default function DetailPage(props: PageProps<"/admin/suppliers/[id]">) {
|
|
|
130
131
|
validate: { change: z.any() },
|
|
131
132
|
}}
|
|
132
133
|
className="min-h-40"
|
|
134
|
+
extensions={richTextEditorPreset}
|
|
133
135
|
>
|
|
134
136
|
<EditorMenuBubble />
|
|
135
137
|
<EditorContent />
|
|
@@ -4,6 +4,7 @@ import { TableCell, type TableColumnDef, TableColumnHeader } from "@tulip-system
|
|
|
4
4
|
import { createTableIndexCell, createTableSelectCell } from "@tulip-systems/data-tables/client";
|
|
5
5
|
import { Editor, EditorContent } from "@tulip-systems/editor/client";
|
|
6
6
|
import Link from "next/link";
|
|
7
|
+
import { richTextEditorPreset } from "@/lib/config/editor";
|
|
7
8
|
import type { TaskTableData } from "../_components/tables";
|
|
8
9
|
import { TaskStatusField } from "./status";
|
|
9
10
|
|
|
@@ -19,7 +20,12 @@ export const taskTableColumns: TableColumnDef<TaskTableData>[] = [
|
|
|
19
20
|
header: ({ column }) => <TableColumnHeader column={column} title="Omschrijving" />,
|
|
20
21
|
cell: ({ row }) => (
|
|
21
22
|
<TableCell className="w-full min-w-80">
|
|
22
|
-
<Editor
|
|
23
|
+
<Editor
|
|
24
|
+
value={row.getValue("description")}
|
|
25
|
+
variant="preview"
|
|
26
|
+
disabled
|
|
27
|
+
extensions={richTextEditorPreset}
|
|
28
|
+
>
|
|
23
29
|
<EditorContent />
|
|
24
30
|
</Editor>
|
|
25
31
|
</TableCell>
|
|
@@ -23,6 +23,7 @@ import {
|
|
|
23
23
|
} from "@tulip-systems/inline/client";
|
|
24
24
|
import Link from "next/link";
|
|
25
25
|
import { z } from "zod";
|
|
26
|
+
import { richTextEditorPreset } from "@/lib/config/editor";
|
|
26
27
|
import { orpc } from "@/server/router/client";
|
|
27
28
|
import type { TaskTableData } from "../_components/tables";
|
|
28
29
|
import type { TaskStatus } from "../_lib/validators";
|
|
@@ -62,6 +63,7 @@ export const taskInlineTableColumns: TableColumnDef<TaskTableData>[] = [
|
|
|
62
63
|
mutation={orpc.tasks.update.mutationOptions()}
|
|
63
64
|
strategy={{ mutate: { on: "change", debounceMs: 700 }, validate: { change: z.any() } }}
|
|
64
65
|
variant="table"
|
|
66
|
+
extensions={richTextEditorPreset}
|
|
65
67
|
>
|
|
66
68
|
<EditorMenuBubble />
|
|
67
69
|
<EditorContent />
|
|
@@ -20,6 +20,7 @@ import { notFound } from "next/navigation";
|
|
|
20
20
|
import { Suspense, use } from "react";
|
|
21
21
|
import { z } from "zod";
|
|
22
22
|
import { Icons } from "@/components/icons";
|
|
23
|
+
import { richTextEditorPreset } from "@/lib/config/editor";
|
|
23
24
|
import { orpc } from "@/server/router/client";
|
|
24
25
|
import { DriveFlatView } from "../../drive/_components/flat.client";
|
|
25
26
|
|
|
@@ -86,6 +87,7 @@ export default function Page(props: PageProps<"/admin/technical-sheets/[id]">) {
|
|
|
86
87
|
mutation={orpc.technicalSheets.update.mutationOptions()}
|
|
87
88
|
strategy={{ mutate: { on: "change", debounceMs: 700 }, validate: { change: z.any() } }}
|
|
88
89
|
className="min-h-24"
|
|
90
|
+
extensions={richTextEditorPreset}
|
|
89
91
|
>
|
|
90
92
|
<EditorMenuBubble />
|
|
91
93
|
<EditorContent />
|
|
@@ -4,6 +4,7 @@ import { TableCell, type TableColumnDef, TableColumnHeader } from "@tulip-system
|
|
|
4
4
|
import { createTableIndexCell, createTableSelectCell } from "@tulip-systems/data-tables/client";
|
|
5
5
|
import { Editor, EditorContent } from "@tulip-systems/editor/client";
|
|
6
6
|
import Link from "next/link";
|
|
7
|
+
import { richTextEditorPreset } from "@/lib/config/editor";
|
|
7
8
|
import type { TechnicalSheetTableData } from "../_components/tables";
|
|
8
9
|
import { TechnicalSheetStatusField } from "./status";
|
|
9
10
|
|
|
@@ -25,7 +26,12 @@ export const technicalSheetTableColumns: TableColumnDef<TechnicalSheetTableData>
|
|
|
25
26
|
header: ({ column }) => <TableColumnHeader column={column} title="Omschrijving" />,
|
|
26
27
|
cell: ({ row }) => (
|
|
27
28
|
<TableCell className="w-full min-w-80">
|
|
28
|
-
<Editor
|
|
29
|
+
<Editor
|
|
30
|
+
value={row.getValue("description")}
|
|
31
|
+
variant="preview"
|
|
32
|
+
disabled
|
|
33
|
+
extensions={richTextEditorPreset}
|
|
34
|
+
>
|
|
29
35
|
<EditorContent />
|
|
30
36
|
</Editor>
|
|
31
37
|
</TableCell>
|
|
@@ -36,7 +42,12 @@ export const technicalSheetTableColumns: TableColumnDef<TechnicalSheetTableData>
|
|
|
36
42
|
header: ({ column }) => <TableColumnHeader column={column} title="Notitie" />,
|
|
37
43
|
cell: ({ row }) => (
|
|
38
44
|
<TableCell className="w-full min-w-80">
|
|
39
|
-
<Editor
|
|
45
|
+
<Editor
|
|
46
|
+
value={row.getValue("notes")}
|
|
47
|
+
variant="preview"
|
|
48
|
+
disabled
|
|
49
|
+
extensions={richTextEditorPreset}
|
|
50
|
+
>
|
|
40
51
|
<EditorContent />
|
|
41
52
|
</Editor>
|
|
42
53
|
</TableCell>
|
|
@@ -4,6 +4,7 @@ import { formatCurrency } from "@tulip-systems/core";
|
|
|
4
4
|
import { TableCell, type TableColumnDef, TableColumnHeader } from "@tulip-systems/data-tables";
|
|
5
5
|
import { createTableSelectCell } from "@tulip-systems/data-tables/client";
|
|
6
6
|
import { Editor, EditorContent } from "@tulip-systems/editor/client";
|
|
7
|
+
import { richTextEditorPreset } from "@/lib/config/editor";
|
|
7
8
|
import type { TemplateTaskTableData } from "../_components/tables";
|
|
8
9
|
|
|
9
10
|
export const templateTaskColumns: TableColumnDef<TemplateTaskTableData>[] = [
|
|
@@ -18,7 +19,12 @@ export const templateTaskColumns: TableColumnDef<TemplateTaskTableData>[] = [
|
|
|
18
19
|
header: ({ column }) => <TableColumnHeader column={column} title="Omschrijving" />,
|
|
19
20
|
cell: ({ row }) => (
|
|
20
21
|
<TableCell>
|
|
21
|
-
<Editor
|
|
22
|
+
<Editor
|
|
23
|
+
value={row.getValue("description") ?? undefined}
|
|
24
|
+
variant="preview"
|
|
25
|
+
disabled
|
|
26
|
+
extensions={richTextEditorPreset}
|
|
27
|
+
>
|
|
22
28
|
<EditorContent />
|
|
23
29
|
</Editor>
|
|
24
30
|
</TableCell>
|
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
InlineTableCellError,
|
|
16
16
|
} from "@tulip-systems/inline/client";
|
|
17
17
|
import { z } from "zod";
|
|
18
|
+
import { richTextEditorPreset } from "@/lib/config/editor";
|
|
18
19
|
import { orpc } from "@/server/router/client";
|
|
19
20
|
import type { TemplateTaskTableData } from "../_components/tables";
|
|
20
21
|
|
|
@@ -56,6 +57,7 @@ export const templateTaskInlineColumns: TableColumnDef<TemplateTaskTableData>[]
|
|
|
56
57
|
strategy={{ mutate: { on: "change", debounceMs: 700 }, validate: { change: z.any() } }}
|
|
57
58
|
variant="table"
|
|
58
59
|
permission={{ template: ["update"] }}
|
|
60
|
+
extensions={richTextEditorPreset}
|
|
59
61
|
>
|
|
60
62
|
<EditorMenuBubble />
|
|
61
63
|
<EditorContent />
|
|
@@ -14,6 +14,7 @@ import { DataStackLayout } from "@tulip-systems/ui/data-stack";
|
|
|
14
14
|
import { notFound } from "next/navigation";
|
|
15
15
|
import { use } from "react";
|
|
16
16
|
import { z } from "zod";
|
|
17
|
+
import { richTextEditorPreset } from "@/lib/config/editor";
|
|
17
18
|
import { orpc } from "@/server/router/client";
|
|
18
19
|
|
|
19
20
|
export default function DetailPage(props: PageProps<"/admin/templates/[id]">) {
|
|
@@ -45,6 +46,7 @@ export default function DetailPage(props: PageProps<"/admin/templates/[id]">) {
|
|
|
45
46
|
mutation={orpc.templates.update.mutationOptions()}
|
|
46
47
|
strategy={{ mutate: { on: "change", debounceMs: 700 }, validate: { change: z.any() } }}
|
|
47
48
|
className="min-h-24"
|
|
49
|
+
extensions={richTextEditorPreset}
|
|
48
50
|
>
|
|
49
51
|
<EditorMenuBubble />
|
|
50
52
|
<EditorContent />
|