Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

WIP partners bulk actions

Tim Wilsonf47ae09bdfe0
diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/partners/partners-table.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/partners/partners-table.tsx
index 54079c30f9..0088c8209d 100644
--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/partners/partners-table.tsx
+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/partners/partners-table.tsx
@@ -38,6 +38,8 @@ import {
Trash,
UserDelete,
Users,
+ Users6,
+ UserXmark,
} from "@dub/ui/icons";
import {
cn,
@@ -290,6 +292,55 @@ export function PartnersTable() {
del: "page",
scroll: false,
}),
+
+ getRowId: (row) => row.id,
+ selectionControls: (table) => (
+ <>
+ <Button
+ variant="primary"
+ text="Add to group"
+ icon={<Users6 className="size-3.5 shrink-0" />}
+ className="h-7 w-fit rounded-lg px-2.5"
+ loading={false}
+ onClick={() => {
+ const partnerIds = table
+ .getSelectedRowModel()
+ .rows.map((row) => row.original.id);
+
+ toast.info("WIP");
+ }}
+ />
+ <Button
+ variant="secondary"
+ text="Archive"
+ icon={<BoxArchive className="size-3.5 shrink-0" />}
+ className="h-7 w-fit rounded-lg px-2.5"
+ loading={false}
+ onClick={() => {
+ const partnerIds = table
+ .getSelectedRowModel()
+ .rows.map((row) => row.original.id);
+
+ toast.info("WIP");
+ }}
+ />
+ <Button
+ variant="secondary"
+ text="Ban"
+ icon={<UserXmark className="size-3.5 shrink-0" />}
+ className="h-7 w-fit rounded-lg px-2.5 text-red-700"
+ loading={false}
+ onClick={() => {
+ const partnerIds = table
+ .getSelectedRowModel()
+ .rows.map((row) => row.original.id);
+
+ toast.info("WIP");
+ }}
+ />
+ </>
+ ),
+
thClassName: "border-l-0",
tdClassName: "border-l-0",
resourceName: (p) => `partner${p ? "s" : ""}`,