Giter Site home page Giter Site logo

workupsrl / nova-opening-hours-field Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sadekd/nova-opening-hours-field

0.0 0.0 0.0 800 KB

Laravel Nova custom field for https://github.com/spatie/opening-hours

License: MIT License

JavaScript 19.89% PHP 13.64% Vue 65.62% SCSS 0.85%

nova-opening-hours-field's Introduction

Nova Opening Hours Field

Laravel Nova custom field for Spatie Opening Hours

Index

Screenshot Index

Form

Screenshot Form

Detail

Screenshot Detail

Installation

You can install the package in to a Laravel app that uses Nova via composer:

composer require workup/nova-opening-hours-field

Usage

Laravel Migration

$table->json('opening_hours');  // can be ->nullable()

Laravel Model

protected $casts = [
    'opening_hours' => 'array',
];

Nova Resource

NovaOpeningHoursField::make(__('Opening Hours'), 'opening_hours'),
// ->allowExceptions(FALSE)    // TRUE by default
// ->allowOverflowMidnight(TRUE)  // FALSE by default
// ->useTextInputs(TRUE)  // FALSE by default

Known issues

  • Lazy validation on time field - losing focus when live(help needed)
  • Editing date in exceptions causes row jumping - key from date(help needed)
  • Browser time input does not support 24:00
  • Browser date input does not support recurring format

TODO

  • Explode interval input => time fields
  • Validation
  • Localization
  • Exceptions
  • Tests

License

The MIT License (MIT). Please see License File for more information.

nova-opening-hours-field's People

Contributors

sadekd avatar crynobone avatar dmason30 avatar rslanzi avatar batformat avatar nembie avatar eimantaaas avatar wasdlauterbach avatar maherelgamil avatar m-a-k-o avatar noahnxt avatar tschigo avatar

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.