Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Awards #155

Closed
5 tasks done
nabeelio opened this issue Jan 28, 2018 · 14 comments
Closed
5 tasks done

Awards #155

nabeelio opened this issue Jan 28, 2018 · 14 comments
Milestone

Comments

@nabeelio
Copy link
Owner

nabeelio commented Jan 28, 2018

Base features

  • New module/addon class?
  • Base class constructor sets award id, etc
    • check() uses those internal IDs
  • Add new subscribe listener - AwardEventListener
    • Run dynamically when UserStatsChanged event is called.
    • Pass the user in, after last pirep, etc is set
    • Runs all award add-on classes
  • Award classes are assigned to record - so images, etc can be set in the admin
    • Admin uses the $name var to show list in panel
    • Allow a parameter to be set in the award row
  • Installer method - creates a new award that acts as the default for the class
    • For a module, just use the migrations to create a new award
    • Needs documentation!
@nabeelio nabeelio added this to the beta milestone Feb 3, 2018
nabeelio added a commit that referenced this issue Mar 17, 2018
@AmericasEngineer
Copy link

Trait 'App\Repositories\Traits\CacheableRepository' not found

am sure you meant to use Prettus\Repository\Traits\CacheableRepository instead

Error is found onApp\Repositories\AwardRepository.php Line 6

@nabeelio
Copy link
Owner Author

@youngbuckscrew Thanks, fixed in this commit. I haven't added tests for this stuff yet, or changed the admin UI yet to allow selecting the custom award class stuff, just fleshing out how the awards class will work. I'm guessing you're messing with it

@AmericasEngineer
Copy link

Yes i'm looking over and testing. I found another errors

on App\Http\Requests\UpdateAwardRequest.php on the rules functions it's returning
return Fare::$rules instead of return Award::$rules which is causing an issue on update.

@nabeelio
Copy link
Owner Author

Yep, just saw that one. I'm working on it as well as getting the award class selector working.

@nabeelio
Copy link
Owner Author

@youngbuckscrew Alright, give it a shot now. The award class selection and parameter description stuff should work now. You should also be able to create your own award class, and place it in a new module or right in the app/Awards directory. It should also run when UserStatsChange is called.

I haven't added any tests yet so stuff might be broken. I'll work on adding those today, since I don't like having stuff left around without tests :)

@AmericasEngineer
Copy link

Okay ill test now, ill report when finished

@nabeelio
Copy link
Owner Author

nabeelio commented Mar 17, 2018

Found a few issues on the actual running of the class. I'm working on it, though I need to step out for a bit, so I'll have it fixed by later today

@nabeelio
Copy link
Owner Author

Added tests and fixed a few things, seems to work properly now

@AmericasEngineer
Copy link

Yes its working correctly. Can we come up with a way to automate the conditional awards? such as the 100 flights one? I got a few ideas.

@nabeelio
Copy link
Owner Author

nabeelio commented Mar 17, 2018 via email

@AmericasEngineer
Copy link

Ahh i get what you mean now, lol sorry! i guess the next feature is make the award image an upload method with maybe intervention.

@nabeelio
Copy link
Owner Author

Intervention?

@AmericasEngineer
Copy link

@nabeelio
Copy link
Owner Author

Thanks, I'll check it out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants