feat(teams): add FAQ entry

Also a few client side fixes
This commit is contained in:
SabreCat
2022-08-22 11:27:08 -05:00
parent 595c131398
commit 89c07529ea
6 changed files with 24 additions and 16 deletions

View File

@@ -129,8 +129,6 @@ import GUILD_INVITATION from './notifications/guildInvitation';
import PARTY_INVITATION from './notifications/partyInvitation'; import PARTY_INVITATION from './notifications/partyInvitation';
import CHALLENGE_INVITATION from './notifications/challengeInvitation'; import CHALLENGE_INVITATION from './notifications/challengeInvitation';
import QUEST_INVITATION from './notifications/questInvitation'; import QUEST_INVITATION from './notifications/questInvitation';
import GROUP_TASK_APPROVAL from './notifications/groupTaskApproval';
import GROUP_TASK_APPROVED from './notifications/groupTaskApproved';
import GROUP_TASK_ASSIGNED from './notifications/groupTaskAssigned'; import GROUP_TASK_ASSIGNED from './notifications/groupTaskAssigned';
import GROUP_TASK_CLAIMED from './notifications/groupTaskClaimed'; import GROUP_TASK_CLAIMED from './notifications/groupTaskClaimed';
import UNALLOCATED_STATS_POINTS from './notifications/unallocatedStatsPoints'; import UNALLOCATED_STATS_POINTS from './notifications/unallocatedStatsPoints';
@@ -155,8 +153,6 @@ export default {
PARTY_INVITATION, PARTY_INVITATION,
CHALLENGE_INVITATION, CHALLENGE_INVITATION,
QUEST_INVITATION, QUEST_INVITATION,
GROUP_TASK_APPROVAL,
GROUP_TASK_APPROVED,
GROUP_TASK_ASSIGNED, GROUP_TASK_ASSIGNED,
GROUP_TASK_CLAIMED, GROUP_TASK_CLAIMED,
UNALLOCATED_STATS_POINTS, UNALLOCATED_STATS_POINTS,
@@ -182,7 +178,7 @@ export default {
openStatus: undefined, openStatus: undefined,
actionableNotifications: [ actionableNotifications: [
'GUILD_INVITATION', 'PARTY_INVITATION', 'CHALLENGE_INVITATION', 'GUILD_INVITATION', 'PARTY_INVITATION', 'CHALLENGE_INVITATION',
'QUEST_INVITATION', 'GROUP_TASK_APPROVED', 'QUEST_INVITATION',
], ],
// A list of notifications handled by this component, // A list of notifications handled by this component,
// listed in the order they should appear in the notifications panel. // listed in the order they should appear in the notifications panel.
@@ -196,8 +192,6 @@ export default {
'CHALLENGE_INVITATION', 'CHALLENGE_INVITATION',
'QUEST_INVITATION', 'QUEST_INVITATION',
'GROUP_TASK_ASSIGNED', 'GROUP_TASK_ASSIGNED',
'GROUP_TASK_APPROVAL',
'GROUP_TASK_APPROVED',
'GROUP_TASK_CLAIMED', 'GROUP_TASK_CLAIMED',
'NEW_MYSTERY_ITEMS', 'NEW_MYSTERY_ITEMS',
'CARD_RECEIVED', 'CARD_RECEIVED',

View File

@@ -94,6 +94,7 @@ export default {
'gems', 'gems',
'bugs-features', 'bugs-features',
'world-boss', 'world-boss',
'group-plans',
]; ];
const hash = window.location.hash.replace('#', ''); const hash = window.location.hash.replace('#', '');
@@ -105,11 +106,6 @@ export default {
wikiTechAssistanceEmail: `mailto:${TECH_ASSISTANCE_EMAIL}`, wikiTechAssistanceEmail: `mailto:${TECH_ASSISTANCE_EMAIL}`,
}, },
visible: hash && headings.includes(hash) ? hash : null, visible: hash && headings.includes(hash) ? hash : null,
// @TODO webFaqStillNeedHelp: {
// linkStart: '[',
// linkEnd: '](/groups/guild/5481ccf3-5d2d-48a9-a871-70a7380cee5a)',
// },
// "webFaqStillNeedHelp": "If you have a question that isn't on this list or on the [Wiki FAQ](https://habitica.fandom.com/wiki/FAQ), come ask in the <%= linkStart %>Habitica Help guild<%= linkEnd %>! We're happy to help."
}; };
}, },
mounted () { mounted () {

View File

@@ -307,7 +307,7 @@
></div> ></div>
</div> </div>
<div <div
v-if="hasTags" v-if="hasTags && !task.group.id"
:id="`tags-icon-${task._id}`" :id="`tags-icon-${task._id}`"
class="d-flex align-items-center" class="d-flex align-items-center"
> >
@@ -317,7 +317,7 @@
></div> ></div>
</div> </div>
<b-popover <b-popover
v-if="hasTags" v-if="hasTags && !task.group.id"
:target="`tags-icon-${task._id}`" :target="`tags-icon-${task._id}`"
triggers="hover" triggers="hover"
placement="bottom" placement="bottom"

View File

@@ -363,7 +363,7 @@
</div> </div>
</div> </div>
<div <div
v-if="!challengeAccessRequired" v-if="!challengeAccessRequired && !groupId"
class="tags-select option mt-3" class="tags-select option mt-3"
> >
<div class="tags-inline form-group row"> <div class="tags-inline form-group row">

View File

@@ -68,5 +68,8 @@
"iosFaqStillNeedHelp": "If you have a question that isn't on this list or on the [Wiki FAQ](https://habitica.fandom.com/wiki/FAQ), come ask in the Tavern chat under Menu > Tavern! We're happy to help.", "iosFaqStillNeedHelp": "If you have a question that isn't on this list or on the [Wiki FAQ](https://habitica.fandom.com/wiki/FAQ), come ask in the Tavern chat under Menu > Tavern! We're happy to help.",
"androidFaqStillNeedHelp": "If you have a question that isn't on this list or on the [Wiki FAQ](https://habitica.fandom.com/wiki/FAQ), come ask in the Tavern chat under Menu > Tavern! We're happy to help.", "androidFaqStillNeedHelp": "If you have a question that isn't on this list or on the [Wiki FAQ](https://habitica.fandom.com/wiki/FAQ), come ask in the Tavern chat under Menu > Tavern! We're happy to help.",
"webFaqStillNeedHelp": "If you have a question that isn't on this list or on the [Wiki FAQ](https://habitica.fandom.com/wiki/FAQ), come ask in the [Habitica Help guild](https://habitica.com/groups/guild/5481ccf3-5d2d-48a9-a871-70a7380cee5a)! We're happy to help." "webFaqStillNeedHelp": "If you have a question that isn't on this list or on the [Wiki FAQ](https://habitica.fandom.com/wiki/FAQ), come ask in the [Habitica Help guild](https://habitica.com/groups/guild/5481ccf3-5d2d-48a9-a871-70a7380cee5a)! We're happy to help.",
"faqQuestion13": "What is a Group Plan?",
"webFaqAnswer13": "## How do Group Plans work?\n\nA [Group Plan](/group-plans) gives your Party or Guild access to a shared task board thats similar to your personal task board! Its a shared Habitica experience where tasks can be created and checked off by anyone in the group.\n\nThere are also features available like member roles, status view, and task assigning that give you a more controlled experience. [Visit our wiki](https://habitica.fandom.com/wiki/Group_Plans) to learn more about our Group Plans features!\n\n## Who benefits from a Group Plan?\n\nGroup Plans work best when you have a small team of people who want to collaborate together. We recommend 2-5 members.\n\nGroup Plans are great for families, whether its a parent and child or you and a partner. Shared goals, chores, or responsibilities are easy to keep track of on one board.\n\nGroup Plans can also be useful for teams of colleagues that have shared goals, or managers that want to introduce their employees to gamification.\n\n## Quick tips for using Groups\n\n* If you want a member to be able to create and edit tasks, make them a manager\n* Leave tasks unassigned if anyone can complete it and it only needs done once\n* Assign a task to one person to make sure no one else can complete their task\n* Assign a task to multiple people if they all need to complete it\n* Copy tasks to your personal board to not miss anything\n* You get rewarded for the tasks you complete, even multi-assigned\n* Task completion rewards arent shared or split between Team members\n* Use task color on the team board to judge the average completion rate of tasks\n* Regularly review the tasks on your Team Board to make sure they are still relevant\n* Missing a Daily wont damage you or your team, but the task will degrade in color\n\n## How can others in the group create tasks?\n\nOnly the group leader and managers can create tasks. If youd like a group member to be able to create tasks, then you should promote them to be a manager by going to the Group Information tab, viewing the member list, and clicking the dot icon by their name.\n\n## How does assigning a task work?\n\nGroup Plans give you the unique ability to assign tasks to other group members. Assigning a task is great for delegating. If you assign a task to someone, then other members are prevented from completing it.\n\nYou can also assign a task to multiple people if it needs to be completed by more than one member. For example, if everyone has to brush their teeth, create a task and assign it to each group member. They will all be able to check it off and get their individual rewards for doing so. The main task will show as complete once everyone checks it off.\n\n## How do unassigned tasks work?\n\nUnassigned tasks can be completed by anyone in the group, so leave a task unassigned to allow any member to complete it. For example, taking out the trash. Whoever takes out the trash can check off the unassigned task and it will show as completed for everyone.\n\n## How does the synchronized day reset work?\n\nShared tasks will reset at the same time for everyone to keep the shared task board in sync. This time is visible on the shared task board and is determined by the group leaders day start time. Because shared tasks reset automatically, you will not get a chance to complete yesterdays uncompleted shared Dailies when you check in the next morning.\n\nShared Dailies will not do damage if they are missed, however they will degrade in color to help visualize progress. We dont want the shared experience to be a negative one!\n\n## How do I use my Group on the mobile apps?\n\nWhile the mobile apps dont fully support all Group Plans functionality yet, you can still complete shared tasks from the iOS and Android app. On the browser version of Habitica, go to your groups shared task board and turn on the copy tasks toggle. Now all open and assigned shared tasks will display on your personal task board across all platforms.\n\n## Whats the difference between a Groups shared tasks and Challenges?\n\nGroup Plan shared task boards are more dynamic than Challenges, in that they can constantly be updated and interacted with. Challenges are great if you have one set of tasks to send out to many people.\n\nGroup Plans are also a paid feature, while Challenges are available free to everyone.\n\nYou cannot assign specific tasks in Challenges, and Challenges do not have a shared day reset. In general, Challenges offer less control and direct interaction."
} }

View File

@@ -370,6 +370,21 @@ api.taskNeedsWork = {
if (canNotEditTasks(group, user)) throw new NotAuthorized(res.t('onlyGroupLeaderCanEditTasks')); if (canNotEditTasks(group, user)) throw new NotAuthorized(res.t('onlyGroupLeaderCanEditTasks'));
await scoreTasks(assignedUser, [{ id: task._id, direction: 'down' }], req, res); await scoreTasks(assignedUser, [{ id: task._id, direction: 'down' }], req, res);
assignedUser.addNotification('GROUP_TASK_NEEDS_WORK', {
message: res.t('taskNeedsWork', { taskText: task.text, managerName: user.profile.name }, assignedUser.preferences.language),
task: {
id: task._id,
text: task.text,
},
group: {
id: group._id,
name: group.name,
},
manager: {
id: user._id,
name: user.profile.name,
},
});
await Promise.all([assignedUser.save(), task.save()]); await Promise.all([assignedUser.save(), task.save()]);
res.respond(200, task); res.respond(200, task);