More staging fixes (#9816)
* Added ability to adjust challenge task copy's streak * Disabled stat allocation if method is incorrect
This commit is contained in:
committed by
Matteo Pagliazzi
parent
6d57ce3050
commit
c0276e3663
@@ -227,7 +227,7 @@
|
||||
.svg-icon.info-icon(v-html="icons.information", v-b-tooltip.hover.righttop.html="$t('attributeAllocationHelp')")
|
||||
.attributes
|
||||
.custom-control.custom-radio.custom-control-inline(v-for="attr in ATTRIBUTES", :key="attr")
|
||||
input.custom-control-input(:id="`attribute-${attr}`", type="radio", :value="attr", v-model="task.attribute")
|
||||
input.custom-control-input(:id="`attribute-${attr}`", type="radio", :value="attr", v-model="task.attribute", :disabled="user.preferences.allocationMode !== 'taskbased'")
|
||||
label.custom-control-label.attr-description(:for="`attribute-${attr}`", v-once, v-b-popover.hover="$t(`${attr}Text`)") {{ $t(attributesStrings[attr]) }}
|
||||
.delete-task-btn.d-flex.justify-content-center.align-items-middle(@click="destroy()", v-if="purpose !== 'create' && !challengeAccessRequired")
|
||||
.svg-icon.d-inline-b(v-html="icons.destroy")
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
"hard": "Hard",
|
||||
"attributes": "Stats",
|
||||
"attributeAllocation": "Stat Allocation",
|
||||
"attributeAllocationHelp": "Stat allocation is an option that provides methods for Habitica to automatically assign an earned Stat Point to a Stat immediately upon level-up. <br/><br/> You can adjust how Automatic Allocation is handled from the Stats section of your profile.",
|
||||
"attributeAllocationHelp": "Stat allocation is an option that provides methods for Habitica to automatically assign an earned Stat Point to a Stat immediately upon level-up. <br/><br/> You can set your Automatic Allocation method to Task Based in the Stats section of your profile.",
|
||||
"progress": "Progress",
|
||||
"daily": "Daily",
|
||||
"dailies": "Dailies",
|
||||
|
||||
@@ -144,7 +144,7 @@ TaskSchema.statics.findByIdOrAlias = async function findByIdOrAlias (identifier,
|
||||
TaskSchema.statics.sanitizeUserChallengeTask = function sanitizeUserChallengeTask (taskObj) {
|
||||
let initialSanitization = this.sanitize(taskObj);
|
||||
|
||||
return _.pick(initialSanitization, ['streak', 'checklist', 'attribute', 'reminders', 'tags', 'notes', 'collapseChecklist', 'alias', 'yesterDaily']);
|
||||
return _.pick(initialSanitization, ['streak', 'checklist', 'attribute', 'reminders', 'tags', 'notes', 'collapseChecklist', 'alias', 'yesterDaily', 'counterDown', 'counterUp']);
|
||||
};
|
||||
|
||||
// Sanitize checklist objects (disallowing id)
|
||||
|
||||
Reference in New Issue
Block a user