Giter Club home page Giter Club logo

bookings's People

Contributors

arwaawan avatar chx2 avatar devjk1 avatar drewroberts avatar huntermontell avatar joshtorres avatar kylebarney avatar pdbreen avatar phuclh avatar prestontoor avatar sl0wik avatar wolfrednicolas avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

tger

bookings's Issues

Phone Relationship

With the creation of the Phone model (TIPOFF/addresses#58), we should add a nullable relationship with Phone on the Participant model (#39). We can use the app('phone') & nova('phone') helpers from tipoff/support.

In addition to changing the database migrations, we should also update the model, factory, and nova resource. Later, we will have a custom nova field (TIPOFF/addresses#108) for our usage of Phone.

Relationship to Phone Model

With the new Phone (TIPOFF/addresses#58) model, all strings of phone numbers in this package should be replaced with a relationship to that model.

I also want to create a nullable relationship to phone on Participant (#39).

Confirmation Emails

There should also be a way to resend confirmation emails from the system.

Review booking model + migration + factory

Comment per @sl0wik:

Make sure that booking migration + factory matching whimsical.

Make sure model booking logic is migrated from previous version.

Comments

This can be replaced with →slot_number checking:

if (empty($booking->slot_id)) {
                throw new \Exception('A booking must be for an availability slot.');
}

All pricing generation should come form checkout packages (ref to generatePricing). Ref: https://github.com/tipoff/support/blob/main/src/Contracts/Checkout/CartInterface.php (check BaseItemContainerInterface )

Bookings Location Based Route

There should be 1 route in this package with a fixed name of /bookings and it should be viewed within the application in the first 3 route segments. This is a location-based route as discussed in this issue:

TIPOFF/locations#85

It would be nice if it has a Page (drewroberts/blog#15) migrated that was associated with it so the content in the view could be dynamic and updated from Laravel Nova, but that is not a necessity.

Email Address Relationship

With the creation of the new Email Addresses model (TIPOFF/authorization#57), all string fields for email in this package should be replaced with a findOrCreate() relationship with that model. We can use the app('email_address') & nova('email_address') helpers added in release 1.8.3 of tipoff/support.

In addition to changing the database migrations, we should also update the model, factory, and nova resource. Later, we will have a custom nova field (TIPOFF/authorization#59) for our usage of Email Address.

Participant (#39) has an existing email field.

Non-nullable fields are not being populated by package factories

I am running into issues in other packages using model factories located within this package. I have found that creator_id and updater_id are not being consistently populated in model factories. The following models need to have them populated in their factories since the fields are indicated as non-nullable index fields. Otherwise they need to have the corresponding fields marked as nullable:

  • Bookings
  • Participants
  • Booking Categories
  • Rate
  • Rate Categories

Tests

Need to implement tests for every feature of the package.

Update user permissions

$request->user()->hasRole determines if location filtering should be applied or not. All of these should be replaced with $request->user()->hasPermissionTo('all locations')

Permissions Migrations

  • bump dependency of tipoff/authorization to 2.5.0
  • Verify all permissions in the policies are included in the package permissions migration
  • Add arrays after every permission in that migration except delete to include the ‘Owner’ role
  • Also add the ‘Staff’ role to the array for every view permission

example from the Fees package:

    public function up()
    {
        $permissions = [
             'view fees' => ['Owner', 'Staff'],
             'create fees' => ['Owner'],
             'update fees' => ['Owner'],
             'delete fees' => [],   // Admin only
        ];

        $this->createPermissions($permissions);
    }

Create booking statuses

Comment per @sl0wik:
For some reason booking_status is commented - it should be implemented.

Booking status for now can be pending , canceled, confirmed

Let's use the tipoff/statuses package for this and just extend it with these Booking related ones in a migration.

Documentation

Need to update the README file to keep it current with package features and document how to best utilize it in a Laravel project.

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.