fix(admin): don't auto calculate Gem cap

also fixes .eslintrc to stop down prop mutations from error level
This commit is contained in:
SabreCat
2023-01-09 16:08:54 -06:00
parent d85436afbf
commit 2f5fd4019d
2 changed files with 51 additions and 41 deletions

View File

@@ -14,6 +14,10 @@ module.exports = {
// TODO find a way to let eslint understand webpack aliases
'import/no-unresolved': 'off',
'import/extensions': 'off',
'vue/component-tags-order': ['warn', {
order: [ 'template', 'style', 'script' ],
}],
'vue/no-mutating-props': 'warn',
'vue/no-v-html': 'off',
'vue/html-self-closing': ['error', {
html: {

View File

@@ -43,7 +43,7 @@
</label>
</div>
<div>
Months until renewal:
Perk offset months:
<strong>{{ hero.purchased.plan.consecutive.offset }}</strong>
</div>
<div>
@@ -62,9 +62,22 @@
>
</label>
</div>
<div class="form-inline">
<label>
Gem cap increase:
<input
v-model="hero.purchased.plan.consecutive.gemCapExtra"
class="form-control"
type="number"
min="0"
max="25"
step="5"
>
</label>
</div>
<div>
Gem cap:
<strong>{{ hero.purchased.plan.consecutive.gemCapExtra + 25 }}</strong>
Total Gem cap:
<strong>{{ Number(hero.purchased.plan.consecutive.gemCapExtra) + 25 }}</strong>
</div>
<div class="form-inline">
<label>
@@ -139,13 +152,6 @@ export default {
return currentPlanContext.nextHourglassDate.format('MMMM');
},
},
watch: {
'hero.purchased.plan.consecutive.count' () { // eslint-disable-line object-shorthand
this.hero.purchased.plan.consecutive.gemCapExtra = Math.min(
Math.floor(this.hero.purchased.plan.consecutive.count / 3) * 5, 25,
);
},
},
methods: {
dateFormat (date) {
return moment(date).format('YYYY/MM/DD');