tipoff / bookings Goto Github PK
View Code? Open in Web Editor NEWLaravel Package for Ecommerce Bookings
License: MIT License
Laravel Package for Ecommerce Bookings
License: MIT License
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.
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).
There should also be a way to resend confirmation emails from the system.
Comment per @sl0wik:
Make sure that booking migration + factory matching whimsical.
Make sure model booking logic is migrated from previous version.
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
)
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:
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.
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.
Participant nova resource displays email object instead of just the email address.
Comment per @sl0wik: Add interfaces from https://whimsical.com/booking-VrUF3bVpqu7JEjKy9tmr3Q to Support contracts.
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:
@sl0wik Can you provide more details about what makes up Variations?
Need to implement tests for every feature of the package.
$request->user()->hasRole determines if location filtering should be applied or not. All of these should be replaced with $request->user()->hasPermissionTo('all locations')
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);
}
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.
Need to update the README file to keep it current with package features and document how to best utilize it in a Laravel project.
Bookings (#38) will implement Statuses (TIPOFF/statuses#20) from the tipoff/statuses pacakge.
Create Permissions (TIPOFF/authorization#22) & assign to default Roles (TIPOFF/authorization#21) using the new PermissionMigration
and Helper in tipoff/authorization package:
Create rates resource (migration + updated model) with new rate schema available here https://whimsical.com/booking-VrUF3bVpqu7JEjKy9tmr3Q.
Add rate categories that used for grouping rates.
Add command to migrate existing schema to a new schema (methodology: whatever works, perhaps could generate inserts from old structure? Will be executed once).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.