fix package#69
Conversation
wolfrednicolas
commented
Apr 21, 2021
- fix policies and unit test in the scheduler package
| })->exceptOnForms(), | ||
| DateTime::make('Start At')->required(), | ||
| nova('rate') ? BelongsTo::make('Rate', 'rate', nova('rate'))->hideWhenCreating()->nullable() : null, | ||
| //TODO is missing the morph relation with schedule_id and schedule_type and the models |
There was a problem hiding this comment.
@drewroberts what will be the models for this morph relation?
There was a problem hiding this comment.
@pdbreen Could you start taking a look at this package and give us some direction on changes you want to make and how to get it structured?
There was a problem hiding this comment.
@wolfrednicolas here's an example of how to setup morph relationships in Nova without knowing which packages will be installed: https://github.com/tipoff/notes/blob/f20b9ed1dbcd98d49e3d479f4c5bd830e6787f19/src/Nova/Note.php#L48
MorphTo::make('Noteable')->types(array_filter([
nova('user'),
nova('contact'),
nova('customer'),
nova('order'),
nova('booking'),
nova('game'),
nova('block'),
nova('slot'),
])),
@drewroberts - it looks like tipoff/addresses needs an issue created to fix the Nova addressable morph to use this technique. The addressable type list should include cart, order, voucher, and probably a bunch of other things, but it needs to be done as above so the packages remain optional.
There was a problem hiding this comment.
@joshtorres @phuclh Could you create an issue for this and get this implemented in the addresses package?
There was a problem hiding this comment.
Thank you @pdbreen I replicate the same structure here. 👍
|
@kylebarney Could you work on this one today to get it ready to merge? |
| nova('user'), | ||
| nova('contact'), | ||
| nova('customer'), | ||
| nova('order'), | ||
| nova('booking'), | ||
| nova('game'), | ||
| nova('block'), | ||
| nova('slot'), |
There was a problem hiding this comment.
This doesn't look like the proper list for this morph. The comment was only showing proper technique, not the desired set of objects.
There was a problem hiding this comment.
@drewroberts could you give me the nova resources related to schedule morph relation?
There was a problem hiding this comment.
Hey @joshtorres is missing the list of objects related to that morph relation, different than that is ready to merge