npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@nuxtus/directus-extension-timesheet

v1.0.0

Published

Timesheet and user timer for projects.

Downloads

4

Readme

Timesheets

A project timer layout for timesheet collections in Directus. Allows users to start/stop a timer and record the times in a timesheet.

Installation

  1. Git clone this project
  2. npm i
  3. npm run build
  4. Copy the entire folder into your Directus extensions folder /extensions/directus-extension-timesheet
  5. Run the supplied schema to update your database: npx directus schema apply ./schema/schema.json
  6. Restart directus
  7. Create your leave types (eg. Annual leave, Sick/Carer's leave, 9 day fortnight, Work from Home etc) in the leave type collection. Note: Where users still accrue leave should be marked as "claimable"
  8. Go to Timesheets > Settings and save your default settings
  9. Set permissions for timesheets and all ts_ collections for each role type
  10. (optional) You can change the collection that the timesheets record time against by visiting the Timesheets > Settings and manually changing the settings
  11. (optional) If you wish to calculate 9 day fortnights, set each users manager and nineDayFortnightStart field. It should be set to the LAST monday (start of the 9DF week) for this staff member.
  12. (recommended) Create a "manual trigger" flow on the leave collection. Add the "Approve Leave" operation to the flow. This will allow users to approve leave.

Note: If using Docker you may want to add the extension to the volumes via directus -> volumes, add: - ./node_-_modules/directus-extension-timesheet/dist:/directus/extensions/directus-extension-timesheet

Using your own task collection

The collection that that timers are run against is configurable in the Timesheet > Settings area. You can change this to any collection you like, but it must have the following fields:

  1. id (integer)
  2. name\description (string) - This can be called anything you want but must be a string
  3. status - A standard Directus status field, only the "active" status is displayed in the timer dropdown

Permissions

It's up to you to manually define the permissions for CRUD operations within Directus. I usually:

  1. Lock users to only being able to CRU the start_time, end_time and project fields.
  2. Add permission to only allow users to view their own timesheets
  3. Give users permission to view everyone's leave, but not edit/delete it.
  4. Do not allow add/edit of the leave approval fields.

Some example roles with these permissions are provided in the schema folder.