Skip to content

Commit

Permalink
Merge pull request #102 from tipoff/kyle/feature/make_booking_cancele…
Browse files Browse the repository at this point in the history
…d_date_optional

Make canceled_at field on Booking model nullable
  • Loading branch information
joshtorres authored May 10, 2021
2 parents c84b46b + 3c0b732 commit 0b502cd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion database/factories/BookingFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function definition()
'experience_type' => 'experience',
'experience_id' => 1,
'processed_at' => $this->faker->dateTimeBetween('+0 days', '+2 years'),
'canceled_at' => $this->faker->dateTimeBetween('+0 days', '+2 years'),
'canceled_at' => null,
'creator_id' => randomOrCreate(app('user')),
'updater_id' => randomOrCreate(app('user')),
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function up()
$table->foreignIdFor(app('booking_slot'));
$table->morphs('agent');
$table->datetime('processed_at');
$table->datetime('canceled_at');
$table->datetime('canceled_at')->nullable();

$table->foreignIdFor(app('user'), 'creator_id');
$table->foreignIdFor(app('user'), 'updater_id');
Expand Down
2 changes: 1 addition & 1 deletion src/Nova/Booking.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public function fields(Request $request)

Date::make('Processed At')->rules('required'),

Date::make('Canceled At')->rules('required'),
Date::make('Canceled At'),

new Panel('Data Fields', $this->dataFields()),
]);
Expand Down

0 comments on commit 0b502cd

Please sign in to comment.