Jump to content

Flight Bids


VERTSPD

Recommended Posts

https://github.com/nabeelio/phpvms/blob/dev/resources/views/layouts/default/flights/scripts.blade.php

 

https://github.com/nabeelio/phpvms/blob/dev/app/Models/Bid.php

 

Logically, if you disable multiple bids and do not allow flights to be bided by more than one pilot (both from admin > settings) then it will be hard to manage something like schedule bidding... Technically it is just a record for the Bid model, flight_id and user_id is mandatory if you want to add them to the model by your own code, if not the script above does it for you on the flight with a button click.

 

Also you can add flights to an array on the fly and then run a batch command with your own code to add them to the model.

 

What exactly are you after, maybe we can think on it and give you some hints about how it works in v7.

 

Good luck

Link to comment
Share on other sites

Ok, if you are going to create those flight groups and pilots will not be able to add/remove or do changes on that list then it should be easy.

 

Just check the script above, you can pass an array of flight_id's along with user_id (of the pilot wishing to bid on that list) to a loop and all will be added to the bids. Or you can have your own controller doing the same, creating bid records for each flight.

 

If you are trying to do assignments of some sort, or something like a tour system (group of flights) then I would not suggest using "bids" for this 'cause pilots have control over their own bids, so they can just delete something you assigned.

 

Hope this helps, good luck

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...