Giter Site home page Giter Site logo

time-tracker's Introduction

Time Tracker SaaS

Features

  • Time Tracking by Activity
  • Clients
  • Projects
  • Reports
  • Authentication
  • Teams?
  • Billing

time-tracker's People

Contributors

ethanmick avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

time-tracker's Issues

Unhandled Runtime Error Error: A <Select.Item /> must have a value prop that is not an empty string

Hi Ethan,

I am having the issue with the following shadcn select component:
<SelectItem value="">None</SelectItem>

It gives the following error:

Unhandled Runtime Error
Error: A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.

The current shadcn version does not accept empty string value="" anymore.

please find below the content of my package.json version:

{
  "name": "time-tracker",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "dev": "next dev",
    "devs": "next dev --experimental-https",
    "build": "prisma generate && next build",
    "start": "next start",
    "lint": "next lint"
  },
  "dependencies": {
    "@prisma/client": "^5.5.2",
    "@radix-ui/react-avatar": "^1.0.4",
    "@radix-ui/react-dialog": "^1.0.5",
    "@radix-ui/react-dropdown-menu": "^2.0.6",
    "@radix-ui/react-label": "^2.0.2",
    "@radix-ui/react-popover": "^1.0.7",
    "@radix-ui/react-select": "^2.0.0",
    "@radix-ui/react-slot": "^1.0.2",
    "class-variance-authority": "^0.7.0",
    "clsx": "^2.0.0",
    "cmdk": "^0.2.0",
    "date-fns": "^2.30.0",
    "lucide-react": "^0.291.0",
    "next": "14.0.1",
    "next-auth": "^4.24.4",
    "react": "^18.2.0",
    "react-day-picker": "^8.9.1",
    "react-dom": "^18.2.0",
    "tailwind-merge": "^2.0.0",
    "tailwindcss-animate": "^1.0.7"
  },
  "devDependencies": {
    "@types/node": "^20.8.10",
    "@types/react": "^18.2.33",
    "@types/react-dom": "^18.2.14",
    "autoprefixer": "^10.4.16",
    "eslint": "^8.52.0",
    "eslint-config-next": "14.0.1",
    "postcss": "^8.4.31",
    "prisma": "5.5.2",
    "tailwindcss": "^3.3.5",
    "typescript": "^5.2.2"
  }
}

I have tried the following for example from the projects->edit->page.tsx

await prisma.project.updateMany({
      where: {
        id: params.id,
        tenantId: user.tenant.id
      },
      data: {
        name: data.get('name') as string,
        color: data.get('color') as string,
        //clientId: client ? client : null
        clientId: client==="None" ? undefined : client
      }
    })

<div>
          <Label htmlFor="email">Client</Label>
          <Select name="client" defaultValue={project.clientId ?? ''}>
            <SelectTrigger className="w-[180px]">
              <SelectValue placeholder="Assign a Client" />
            </SelectTrigger>
            <SelectContent>
              <SelectGroup>
                <SelectLabel>Client</SelectLabel>
                <SelectItem value="None">None</SelectItem>

It doesn't seem to work well,
could you provide any fix?

Thank you very much.
BR

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.