VERTSPD Posted June 16, 2023 Report Share Posted June 16, 2023 I am trying to create a schedule bidding system for my VA but I am unable to find any documentation that explains how to work the flight bids process in phpvms. Can someone help? Thanks Quote Link to comment Share on other sites More sharing options...
DisposableHero Posted June 16, 2023 Report Share Posted June 16, 2023 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 Quote Link to comment Share on other sites More sharing options...
VERTSPD Posted June 17, 2023 Author Report Share Posted June 17, 2023 Thanks for the reply. I would like to create a group of flights which pilots can bid using some sort of code. The assignment of bids would be based on their ID number. Thanks Quote Link to comment Share on other sites More sharing options...
DisposableHero Posted June 17, 2023 Report Share Posted June 17, 2023 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 Quote Link to comment Share on other sites More sharing options...
VERTSPD Posted June 18, 2023 Author Report Share Posted June 18, 2023 I believe it should do it thanks. Is there any way you can show me how to add this code to the website? Quote Link to comment Share on other sites More sharing options...
DisposableHero Posted June 18, 2023 Report Share Posted June 18, 2023 https://docs.phpvms.net/developers/addons Docs may help, at least explains the basic needs of v7 addon development and gives you nice directs to follow. Other than this I assume you already have some basic knowledge about html and php 'cause they are needed too. Good luck Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.