Skip to content

Commit

Permalink
Merge branch 'main' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
DonKoko committed Aug 8, 2024
2 parents 388be69 + 1a8f366 commit 89ceb67
Show file tree
Hide file tree
Showing 78 changed files with 683 additions and 292 deletions.
8 changes: 6 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ SERVER_URL="http://localhost:3000"

# Used for shortening URLs of QR codes. Optional
# If present, the QR code will be generated with a shortened URL
# URL_SHORTENER="https://hey.lo/"
# Should not include the protocol (http/https) or a trailing slash
# URL_SHORTENER="eam.sh"


APP_NAME="Shelf"
Expand Down Expand Up @@ -59,4 +60,7 @@ GEOCODE_API_KEY="geocode-api-key"
SENTRY_ORG="sentry-org"
SENTRY_PROJECT="sentry-project"
SENTRY_DSN="sentry-dsn"
# CHROME_EXECUTABLE_PATH="/usr/bin/chromium"
# CHROME_EXECUTABLE_PATH="/usr/bin/chromium"

# Used for sending emails to admins for stuff like Request user delete. Optional. Defaults to [email protected]
ADMIN_EMAIL="[email protected]"
2 changes: 1 addition & 1 deletion app/components/assets/actions-dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import {
DropdownMenuItem,
DropdownMenuTrigger,
} from "~/components/shared/dropdown";
import { useControlledDropdownMenu } from "~/hooks/use-controlled-dropdown-menu";
import type { loader } from "~/routes/_layout+/assets.$assetId";
import { tw } from "~/utils/tw";
import { useControlledDropdownMenu } from "~/utils/use-controlled-dropdown-menu";
import { DeleteAsset } from "./delete-asset";
import { UpdateGpsCoordinatesForm } from "./update-gps-coordinates-form";
import Icon from "../icons/icon";
Expand Down
2 changes: 1 addition & 1 deletion app/components/assets/bulk-actions-dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import { useNavigation } from "@remix-run/react";
import { useAtomValue } from "jotai";
import { useHydrated } from "remix-utils/use-hydrated";
import { selectedBulkItemsAtom } from "~/atoms/list";
import { useControlledDropdownMenu } from "~/hooks/use-controlled-dropdown-menu";
import { isFormProcessing } from "~/utils/form";
import { isSelectingAllItems } from "~/utils/list";
import { tw } from "~/utils/tw";
import { useControlledDropdownMenu } from "~/utils/use-controlled-dropdown-menu";
import BulkAssignCustodyDialog from "./bulk-assign-custody-dialog";
import BulkCategoryUpdateDialog from "./bulk-category-update-dialog";
import BulkDeleteDialog from "./bulk-delete-dialog";
Expand Down
2 changes: 1 addition & 1 deletion app/components/booking/availability-select.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useMemo } from "react";
import { useSearchParams } from "~/hooks/search-params/use-search-params";
import { useSearchParams } from "~/hooks/search-params";

import {
Select,
Expand Down
2 changes: 1 addition & 1 deletion app/components/booking/bulk-actions-dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { useNavigation } from "@remix-run/react";
import { useAtomValue } from "jotai";
import { useHydrated } from "remix-utils/use-hydrated";
import { selectedBulkItemsAtom } from "~/atoms/list";
import { useControlledDropdownMenu } from "~/hooks/use-controlled-dropdown-menu";
import { useUserRoleHelper } from "~/hooks/user-user-role-helper";
import { isFormProcessing } from "~/utils/form";
import {
Expand All @@ -11,7 +12,6 @@ import {
} from "~/utils/permissions/permission.data";
import { userHasPermission } from "~/utils/permissions/permission.validator.client";
import { tw } from "~/utils/tw";
import { useControlledDropdownMenu } from "~/utils/use-controlled-dropdown-menu";
import BulkArchiveDialog from "./bulk-archive-dialog";
import BulkCancelDialog from "./bulk-cancel-dialog";
import BulkDeleteDialog from "./bulk-delete-dialog";
Expand Down
3 changes: 1 addition & 2 deletions app/components/booking/status-filter.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useNavigation } from "@remix-run/react";
import { useSearchParams } from "~/hooks/search-params/use-search-params";
import { useSearchParams } from "~/hooks/search-params";
import { isFormProcessing } from "~/utils/form";
import {
Select,
Expand All @@ -23,7 +23,6 @@ export function StatusFilter({
setSearchParams((prev) => {
/** If the value is "ALL", we just remove the param */
if (value === "ALL") {
//make sure this is added where-ever we are explicitly delteting the searchaprams manually.
prev.delete("status");
return prev;
}
Expand Down
2 changes: 1 addition & 1 deletion app/components/bulk-update-dialog/bulk-update-dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
selectedBulkItemsAtom,
selectedBulkItemsCountAtom,
} from "~/atoms/list";
import { useSearchParams } from "~/hooks/search-params/use-search-params";
import { useSearchParams } from "~/hooks/search-params";
import type { action } from "~/routes/api+/assets.bulk-update-location";
import { isFormProcessing } from "~/utils/form";
import { tw } from "~/utils/tw";
Expand Down
2 changes: 1 addition & 1 deletion app/components/category/bulk-actions-dropdown.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { useAtomValue } from "jotai";
import { useHydrated } from "remix-utils/use-hydrated";
import { selectedBulkItemsCountAtom } from "~/atoms/list";
import { useControlledDropdownMenu } from "~/hooks/use-controlled-dropdown-menu";
import { tw } from "~/utils/tw";
import { useControlledDropdownMenu } from "~/utils/use-controlled-dropdown-menu";
import BulkDeleteDialog from "./bulk-delete-dialog";
import { BulkUpdateDialogTrigger } from "../bulk-update-dialog/bulk-update-dialog";
import { ChevronRight } from "../icons/library";
Expand Down
2 changes: 1 addition & 1 deletion app/components/custom-fields/bulk-actions-dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import { useNavigation } from "@remix-run/react";
import { useAtomValue } from "jotai";
import { useHydrated } from "remix-utils/use-hydrated";
import { selectedBulkItemsAtom } from "~/atoms/list";
import { useControlledDropdownMenu } from "~/hooks/use-controlled-dropdown-menu";
import { isFormProcessing } from "~/utils/form";
import { tw } from "~/utils/tw";
import { useControlledDropdownMenu } from "~/utils/use-controlled-dropdown-menu";
import BulkActivateDialog from "./bulk-activate-dialog";
import BulkDeactivateDialog from "./bulk-deactivate-dialog";
import { BulkUpdateDialogTrigger } from "../bulk-update-dialog/bulk-update-dialog";
Expand Down
2 changes: 1 addition & 1 deletion app/components/kits/actions-dropdown.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { useLoaderData } from "@remix-run/react";
import { useHydrated } from "remix-utils/use-hydrated";
import { useControlledDropdownMenu } from "~/hooks/use-controlled-dropdown-menu";
import type { loader } from "~/routes/_layout+/kits.$kitId";
import { tw } from "~/utils/tw";
import { useControlledDropdownMenu } from "~/utils/use-controlled-dropdown-menu";
import DeleteKit from "./delete-kit";
import Icon from "../icons/icon";
import { ChevronRight } from "../icons/library";
Expand Down
2 changes: 1 addition & 1 deletion app/components/kits/bulk-actions-dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import { useNavigation } from "@remix-run/react";
import { useAtomValue } from "jotai";
import { useHydrated } from "remix-utils/use-hydrated";
import { selectedBulkItemsAtom } from "~/atoms/list";
import { useControlledDropdownMenu } from "~/hooks/use-controlled-dropdown-menu";
import { isFormProcessing } from "~/utils/form";
import { isSelectingAllItems } from "~/utils/list";
import { tw } from "~/utils/tw";
import { useControlledDropdownMenu } from "~/utils/use-controlled-dropdown-menu";
import BulkAssignCustodyDialog from "./bulk-assign-custody-dialog";
import BulkDeleteDialog from "./bulk-delete-dialog";
import BulkReleaseCustodyDialog from "./bulk-release-custody-dialog";
Expand Down
7 changes: 6 additions & 1 deletion app/components/layout/header/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,12 @@ export type Action = {
};

/** The button variant. Default is primary */
export type ButtonVariant = "primary" | "secondary" | "tertiary" | "link";
export type ButtonVariant =
| "primary"
| "secondary"
| "tertiary"
| "link"
| "danger";

/** Width of the button. Default is auto */
export type ButtonWidth = "auto" | "full";
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { CategorySelectNoCategories } from "~/components/category/category-selec

import { Badge } from "~/components/shared/badge";
import { Button } from "~/components/shared/button";
import { useSearchParams } from "~/hooks/search-params/use-search-params";
import { useSearchParams } from "~/hooks/search-params";
import type { WithDateFields } from "~/modules/types";
import { useCategorySearch } from "../../../category/useCategorySearch";
import Input from "../../../forms/input";
Expand Down
2 changes: 1 addition & 1 deletion app/components/list/filters/search-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useLoaderData, useNavigation } from "@remix-run/react";

import Input from "~/components/forms/input";
import { Button } from "~/components/shared/button";
import { useSearchParams } from "~/hooks/search-params/use-search-params";
import { useSearchParams } from "~/hooks/search-params";
import type { SearchableIndexResponse } from "~/modules/types";
import { isSearching } from "~/utils/form";
import { tw } from "~/utils/tw";
Expand Down
2 changes: 1 addition & 1 deletion app/components/list/filters/sort-by.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
PopoverTrigger,
} from "@radix-ui/react-popover";
import { useNavigation } from "@remix-run/react";
import { useSearchParams } from "~/hooks/search-params/use-search-params";
import { useSearchParams } from "~/hooks/search-params";

import { isFormProcessing } from "~/utils/form";
import { tw } from "~/utils/tw";
Expand Down
2 changes: 1 addition & 1 deletion app/components/list/filters/tag/tag-checkbox-dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { useAtom, useAtomValue } from "jotai";
import { useTagSearch } from "~/components/category/useTagSearch";
import { Badge } from "~/components/shared/badge";
import { Button } from "~/components/shared/button";
import { useSearchParams } from "~/hooks/search-params/use-search-params";
import { useSearchParams } from "~/hooks/search-params";
import type { WithDateFields } from "~/modules/types";
import Input from "../../../forms/input";
import { CheckIcon, ChevronRight } from "../../../icons/library";
Expand Down
2 changes: 1 addition & 1 deletion app/components/list/pagination/page-number.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useMemo } from "react";
import { NavLink } from "@remix-run/react";
import { useSearchParams } from "~/hooks/search-params/use-search-params";
import { useSearchParams } from "~/hooks/search-params";

import { getParamsValues } from "~/utils/list";
import { mergeSearchParams } from "~/utils/merge-search-params";
Expand Down
2 changes: 1 addition & 1 deletion app/components/list/pagination/per-page-items-select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
SelectContent,
SelectItem,
} from "~/components/forms/select";
import { useSearchParams } from "~/hooks/search-params/use-search-params";
import { useSearchParams } from "~/hooks/search-params";

import type { loader } from "~/routes/_layout+/assets._index";

Expand Down
2 changes: 1 addition & 1 deletion app/components/location/bulk-actions-dropdown.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { useAtomValue } from "jotai";
import { useHydrated } from "remix-utils/use-hydrated";
import { selectedBulkItemsCountAtom } from "~/atoms/list";
import { useControlledDropdownMenu } from "~/hooks/use-controlled-dropdown-menu";
import { tw } from "~/utils/tw";
import { useControlledDropdownMenu } from "~/utils/use-controlled-dropdown-menu";
import BulkDeleteDialog from "./bulk-delete-dialog";
import { BulkUpdateDialogTrigger } from "../bulk-update-dialog/bulk-update-dialog";
import { ChevronRight } from "../icons/library";
Expand Down
2 changes: 1 addition & 1 deletion app/components/nrm/bulk-actions-dropdown.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { useAtomValue } from "jotai";
import { useHydrated } from "remix-utils/use-hydrated";
import { selectedBulkItemsAtom } from "~/atoms/list";
import { useControlledDropdownMenu } from "~/hooks/use-controlled-dropdown-menu";
import { tw } from "~/utils/tw";
import { useControlledDropdownMenu } from "~/utils/use-controlled-dropdown-menu";
import BulkDeleteDialog from "./bulk-delete-dialog";
import { BulkUpdateDialogTrigger } from "../bulk-update-dialog/bulk-update-dialog";
import { ChevronRight } from "../icons/library";
Expand Down
4 changes: 4 additions & 0 deletions app/components/shared/button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ export const Button = React.forwardRef<HTMLElement, ButtonProps>(
link: tw(
`border-none p-0 text-text-sm font-semibold text-primary-700 hover:text-primary-800`
),
danger: tw(
`border-error-600 bg-error-600 text-white focus:ring-2`,
disabled ? "border-error-300 bg-error-300" : "hover:bg-error-800"
),
};

const sizes = {
Expand Down
2 changes: 1 addition & 1 deletion app/components/subscription/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const FREE_PLAN = {
Automatic Upgrades,
Server Maintenance
`,
slogan: "Free forever. No credit card required.",
slogan: "For personal use or hobby use.",
},
},
unit_amount: 0,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useCallback } from "react";
import { useLoaderData } from "@remix-run/react";
import { AnimatePresence } from "framer-motion";
import { useSearchParams } from "~/hooks/search-params/use-search-params";
import { useSearchParams } from "~/hooks/search-params";

import type { loader } from "~/routes/_layout+/account-details.subscription";
import { Button } from "../shared/button";
Expand Down
2 changes: 1 addition & 1 deletion app/components/tag/bulk-actions-dropdown.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { useAtomValue } from "jotai";
import { useHydrated } from "remix-utils/use-hydrated";
import { selectedBulkItemsCountAtom } from "~/atoms/list";
import { useControlledDropdownMenu } from "~/hooks/use-controlled-dropdown-menu";
import { tw } from "~/utils/tw";
import { useControlledDropdownMenu } from "~/utils/use-controlled-dropdown-menu";
import BulkDeleteDialog from "./bulk-delete-dialog";
import { BulkUpdateDialogTrigger } from "../bulk-update-dialog/bulk-update-dialog";
import { ChevronRight } from "../icons/library";
Expand Down
Loading

0 comments on commit 89ceb67

Please sign in to comment.