Skip to content

Commit 9e78b73

Browse files
committed
fix: wording
1 parent 295cf2d commit 9e78b73

2 files changed

Lines changed: 53 additions & 10 deletions

File tree

src/components/dialogs/bulk-action-dialog.tsx

Lines changed: 52 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {
1313
interface Props {
1414
open: boolean;
1515
setOpen: (open: boolean) => void;
16-
type: "cooking" | "crafting" | "shipping" | "museum";
16+
type: "cooking" | "crafting" | "shipping" | "museum" | "fishing";
1717
onBulkAction?: (
1818
status: number | null,
1919
selectedItems: Set<string>,
@@ -75,19 +75,17 @@ export const BulkActionDialog = ({
7575
let foundLabel = "Set All Selected as Completed";
7676
let notFoundLabel = "Set All Selected as Incomplete";
7777
if (type === "museum") {
78-
foundLabel = "Set All Selected as Found";
79-
notFoundLabel = "Set All Selected as Not Found";
78+
foundLabel = "Set All Selected as Donated";
79+
notFoundLabel = "Set All Selected as Not Donated";
8080
} else if (type === "shipping") {
8181
foundLabel = "Set All Selected as Shipped";
8282
notFoundLabel = "Set All Selected as Unshipped";
83+
} else if (type === "fishing") {
84+
foundLabel = "Set All Selected as Caught";
85+
notFoundLabel = "Set All Selected as Uncaught";
8386
}
8487

85-
if (
86-
type === "museum" ||
87-
type === "shipping" ||
88-
type === "cooking" ||
89-
type === "crafting"
90-
) {
88+
if (type === "museum" || type === "shipping" || type === "fishing") {
9189
return (
9290
<Dialog open={open} onOpenChange={setOpen}>
9391
<DialogContent>
@@ -115,6 +113,51 @@ export const BulkActionDialog = ({
115113
);
116114
}
117115

116+
if (type === "cooking" || type === "crafting") {
117+
return (
118+
<Dialog open={open} onOpenChange={setOpen}>
119+
<DialogContent>
120+
<DialogHeader>
121+
<DialogTitle>Bulk Action</DialogTitle>
122+
<DialogDescription>
123+
{selectedItems.size} items selected
124+
</DialogDescription>
125+
</DialogHeader>
126+
<div className="grid gap-4 py-4">
127+
<div className="grid grid-cols-1 gap-2">
128+
<Button
129+
variant="outline"
130+
onClick={() => handleBulkAction(null)}
131+
disabled={!activePlayer}
132+
>
133+
Set Unknown
134+
</Button>
135+
<Button
136+
variant="outline"
137+
onClick={() => handleBulkAction(1)}
138+
disabled={!activePlayer}
139+
>
140+
Set Known
141+
</Button>
142+
<Button
143+
variant="outline"
144+
onClick={() => handleBulkAction(2)}
145+
disabled={!activePlayer}
146+
>
147+
Set Completed
148+
</Button>
149+
</div>
150+
</div>
151+
<DialogFooter>
152+
<Button variant="secondary" onClick={() => setOpen(false)}>
153+
Cancel
154+
</Button>
155+
</DialogFooter>
156+
</DialogContent>
157+
</Dialog>
158+
);
159+
}
160+
118161
return (
119162
<Dialog open={open} onOpenChange={setOpen}>
120163
<DialogContent>

src/pages/fishing.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ export default function Fishing() {
386386
<BulkActionDialog
387387
open={bulkActionOpen}
388388
setOpen={setBulkActionOpen}
389-
type="shipping"
389+
type="fishing"
390390
onBulkAction={handleFishingBulkAction}
391391
/>
392392
</main>

0 commit comments

Comments
 (0)