Giter Club home page Giter Club logo

mindlogger-admin-old-vue's Introduction

MindLogger Administrator Panel

GitHub version

Project setup

npm install

Compiles and hot-reloads for local

create .env.local file with 1 record NODE_ENV=local then use command below

npm run serve

Runs unit tests

npm run test:unit

Compiles and minifies for production

npm run build

Lints and fixes files

npm -g i eslint-cli
eslint "src/**/*.{js,vue}"

deploy

to deploy any branch to test server you need to config aws cli first using this command aws configure --profile mindlogger_aws then run commands

  • npm run build-dev
  • npm run dev-deploy

mindlogger-admin-old-vue's People

Contributors

akeshavan avatar bammironov avatar binarybottle avatar clickermonkey avatar dependabot[bot] avatar devbtech avatar eden2016 avatar henryrossiter avatar hotavocado avatar ihornesterenko99 avatar iradchenk0 avatar jj105 avatar karser avatar ngonzalvez avatar odziem avatar olivierlacan avatar peterpeterparker avatar shnizzedy avatar sshetty2 avatar sshetty2-escalate avatar techdev137 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mindlogger-admin-old-vue's Issues

Keep user signed in when Refreshing Page in Admin

Expected Results: When a signed-in user is in the dashboard and refreshes the page, the system should simply refresh, leave the user signed in and on the page they are looking at.
Actual Results: When a user refreshes in the dashboard, the user is logged out

user management

  1. get the group id from an applet GET /applet/{id}/roles --> gives an object.user.groups[0]._id
  2. invite the user to the group: POST /group/{id}/invitation with userId as a param
  3. on the mobile app (and eventually web) get a user's invitations through GET /user/invites
  4. when the user clicks an accept button, do POST /groups/{id}/member
  • we need a way to lookup a user by email address, and if they aren't there, then save somewhere that they need to be invited to a group

Give the ability to managers and coordinators to set individual schedules

As a manager or coordinator, I want to set an activity schedule for an individual user or more than one of an applet so that my user has customized scheduling of the activity.

Description: Managers or coordinators need to be able to set schedules for each user of the applet on an activity level individually. The manager should also be able to select one or more users to apply a new calendar for. This means for User A the activities within a protocol can be scheduled differently every day of the week then the rest of the users in the applet. The activities can also be scheduled multiple times during that day. This is all managed within the admin panel.

Requirements:

  • If the applet has a schedule already in place, the schedule defined for that user(s) overrides the original schedule
  • One or more users can be selected and a calendar can be built for them by the manager/coordinator. This should be an easy click each user, drag to select multiple, type selection

I want to manage roles of an applet - Organizers

As an owner or manager, I want to manage the organizers that have access to an applet so that the right users are given access to what they need to accomplish the user's task

Requirements:

Admin Panel

  1. Have each role in a separate tab on the dashboard.
  2. If a user is an editor and a reviewer then that user would show up on both tabs

Owner/ Manager

  1. Give the owner/ manager the ability to edit an organizer's access to the applet they are managing. I.e.: Changing an editor's permission to the reviewer, etc
  2. Give the owner/manager the ability to revoke access to any role type an applet
  3. Any types of roles that is not a user can have the user type changed from the admin dashboard (does not need a new invitation)
  4. Editors, Coordinators, and Reviewers can have multiple combinations of access. (One account could be a reviewer and an editor or all three, etc)
  5. Owners/ Managers can revoke one permission type and leave the rest
  6. Owners/ Managers can add and remove users from a reviewer's permissions

Organizer Mgmt (1).png

Here is the different permission levels

Relates to #39

Ability to set Activity time on blue card

Expected Results: When a user creates an activity with the blue card, the option to set the time is available
Actual Results: The user can only set activity for the day the user clicked on

mindlogger-admin (5).png

The color of the activity card is not changed after editing the event

Steps to reproduce:

  1. Log in to the admin panel https://admin.mindlogger.org/#
  2. Navigate to the schedule page
  3. Set up one event on the calendar and save
  4. Open that card end edit it changing the events and save
  5. Pay attention to the result

Actual result: The color of the activity card is not changed after editing the event
Video: https://www.dropbox.com/s/ldmq72yjg3tp758/2020-04-21_18-00-24.MP4?dl=0
Expected result: The activity card should be changed to corresponding color after editing the event

Environment:
Prod server
Win 10 //Chrome 81// Firefox 75

Spread Admin Panel Across Routes

Currently, most of the Admin Panel is hosted at www.admin.mindlogger.org/#/ . Although vue-router is already implemented, only the Protocol Builder has its own route, www.admin.mindlogger.org/#/build.

We are currently using a Stepper component to navigate between screens. As the Admin Panel scales, we should get rid of the Stepper and spread the different screens across different routes.

Advantages of using more routes:

  • Refreshing the browser will not navigate back to the login screen by default
  • Load screens one at a time, potentially improving performance
  • Navigate directly to certain screens with specific URL

Blueprint for routes:

  • / - default route, should point to a home screen or redirect to login
  • /build -> Protocol Builder (already implemented)
  • /login -> Login + SetBackend screens combined
  • /applets -> SetApplet screen
  • /users -> SetUsers screen
  • /schedules -> SetSchedule screen

All routes except /login should check for cached authentication tokens and redirect to /login if the user is not logged in.

Relevant files:

Related issues:

Firefox. The "Network Error" is displayed after trying to log in to the admin panel

Steps to reproduce:
The user is registered on the site ( snakeprod // 123456)
Steps to reproduce:

  1. Open the page https://admin.mindlogger.org/#/login
  2. Specify your credentials and click the "LOGIN" button
  3. Pay attention to the result

Actual result: The "Network Error" is displayed after trying to log in to the admin panel
Video: https://www.dropbox.com/s/tpaw0mobn9y5g39/2020-04-21_16-33-18.MP4?dl=0
Note: The same behavior occurs after trying to log in with the empty "Login" form
Expected result: The user is logged in successfully

Environment:
Prod server
Win 10 x64 //Firefox 75

Server load reduction

At the moment, all events for updates are sent to the server.
for example:
if 1 user has ~100 events on the calendar. they will all be sent to the server.
it would be nice to send events that have been changed or added instead of all

in this approach, we don’t have to sort through all the events on the server and update or add only those that come from the client side

I want to create a new Applet from an existing

As an editor, I want to duplicate an existing applet from my database and make changes to it so that I can customize it for a different use

Requirements:

  • Allow user to duplicate an existing applet and require the user to change the applet name. If the user does not change the name then we simply add a (1), etc to the end of the new applet's name.
  • Editing is covered in ChildMindInstitute/mindlogger-app#119
  • The applet is saved as new
  • Users and schedules are not copied to the new applet.
  • This effort does include retrieving a GitHub stored protocol
  • When an applet is duplicated, the organization roles (manager, reviewer, coordinator, and editor) are not retained for the new applet. Only Owner and editor roles are stored for the new applet. User access is not copied over either

Applet Builder

  • Editor should be landed on the applet builder with all fields filled out mirroring the original applet.
  • All fields should be editable

3 in the below diagram

schemaFlow.png

Acceptance Criteria
Given I am an editor with applets in my database
When I navigate to my activity builder
Then I select which applet I want to duplicate and hit duplicate

Given I am an editor
When I duplicate an applet of mine
Then I am required to rename it before I can edit it

Blue Activity Card Doesn't Automatically Disappear

Description: When user is enterting new activities and navigates back to an old the blue card doesn't close automatically
Expected Results: When user clicks off of blue card it disappears
Actual Results: Blue card does not disappear until the user clicks the X

mindlogger-admin (4).png

❓Having problems with the scheduling page

I just tried to schedule an applet on the admin panel and this happened:

screen_recording

Whenever I try to access scheduling preferences or just hit save, the list of activities on the left side automatically changes to those from a different protocol I scheduled previously. Might be a problem with cache.

TokenReport with additional comments

As a manager, I want to export a report about a user and add comments so that I can customize the messaging to the user.

Requirements

  • Export a PDF that shows the time range the user has selected
  • The frequency chart and the cumulative score chart should be shown
  • The mockup is not to scale but only for representation of expectations
  • When the admin selects "Export to PDF" from the data visualization screen, show a module to create notes in markdown
    ** If the user does not add notes, do not show that section in the PDF when exported

TokenReport.png

I want to upload a protocol from Github

As an editor, I want to upload a protocol from github into the builder so that I can provide premade assessments to my patients.

Requirements:

  • Provide a way for an editor, to upload a protocol in the activity builder so the user can edit it and publish it to their MindLogger users (publishing being developed in ChildMindInstitute/mindlogger-app#201)
  • Require editor to rename the protocol before editing/ saving
    • The editor can change the name in the protocol builder following this

1 in the below diagram

schemaFlow.png

Acceptance Criteria

Given I am an editor
When I have a new protocol from Github I want to use
Then I navigate to the activity builder and upload it via the URL

Given I am an editor
When I upload a protocol
Then I am required to name the new upload

Given I am an editor
When I rename a new upload
Then I can edit it(#119) and save it to my database (#201)

The validation messages are not shown after saving the event card with empty timeout fields

Steps to reproduce:

  1. Log in to the admin panel https://admin.mindlogger.org/
  2. Navigate to the schedule page
  3. Click the "+" button
  4. Click the pencil icon and select an event
  5. Mark the "Allow timeout" checkbox
  6. Uncheck the "All day" checkbox
  7. Clear the timeout fields and click the "Save" button
  8. Pay attention to the result

Actual result: The validation messages are not shown after saving the event card with empty timeout fields. The card is saved with empty timeout fields.

Video: https://www.dropbox.com/s/iliftw48gmgjmcm/2020-04-21_18-37-45.MP4?dl=0
Expected result: The validation messages are shown after saving the event card with empty timeout fields

Environment:

Prod server
Win10 // Chrome 81 // Edge

Confirmation Text Awkwardly Shown

Expected Results: Textbox fills to keep words together
Actual Results: Textbox breaks works into pieces to make it fit the textbox

mindlogger-admin (1).png

Nothing happens after clicking the Remove button or basket icon for the event on the schedule page

Steps to reproduce:

  1. Log in to the admin panel https://admin.mindlogger.org/#/ ( snakeprod // 123456 )
  2. Select the NIMH applet
  3. Set up several events for the general schedule
  4. Try to delete these events from the calendar
  5. Pay attention to the result

Actual result: Nothing happens after clicking the Remove button or basket icon for the event on the schedule page
Video: https://www.dropbox.com/s/5e5zvc7l4p71xg0/2020-04-21_16-03-21.MP4?dl=0
Note: The "Are you sure you want to remove this event?" modal window is shown only after reloading the page
Expected result: The "Are you sure you want to remove this event?" modal window is shown after clicking the Remove button or basket icon for the event on the schedule page

Environment:
Prod server
Win 10 x 64 // Chrome Version 81.0.4044.113 // Edge

Med Reminder Applet

As an editor, I want to create an applet to remind my users to take their medication on time so that they do not miss when to take it.

Editing Item Configuration

Expected behavior: After a user saves an item or an activity, that item or activity can be reopened and the previously saved configuration can be edited seamlessly.
Actual Behavior: When user goes to edit a previously saved item's configuration, the configuration is blank and must be re-written for most item types.

Similar to ChildMindInstitute/mindlogger-admin#79

Editor Audio Recorded Item

As an editor, I want to record audio from the builder so that I can create audio playback for the user while they are taking an assessment.

Requirements:

  • Allow the user to

Unsupported Calendar + Outdated Vuetify

Project is currently using Vuetify 1.3.9. Vuetify 2 was released months ago and 2.1.3 is available as of October 2019. The dayspan-vuetify calendar library doesn't support Vuetify 2. We should eventually find a new calendar component so we can update Vuetify.

Activies on Calendar do not show on Day/Week

Expected Results: When user inputs activities on month screen of the calendar, the show up on the other filtered tabs (day, week)
Actual Results: Activites do not show on day or week filter

ezgif-7-f16afe6c1afd.gif

Editing Slider Options Disappear

Expected behavior: After user saves the slider logic, when the user goes to edit it then the text is still present
Actual Behavior: When user goes to edit a slider logic, the text is gone

mindlogger-admin (11).png

Text does not make sense for applet

Expected Results: Text displayed would describe the applet presently available
Actual Results: The text does not give the user any direction as to what it is

mindlogger-admin

Editing Calendar Dates

The three vertical dots should allow calendar events to be moved or deleted. This was broken when we moved to dayspan-vuetify-2
image

Editing Activities of an Applet

As an editor, I want to edit activities that are part of my applet so that I can update or change questions for the applet.

Description: An editor needs the ability to revise an activity within an applet that is currently in use. This change made by the editor would retain the historical data from the previously taken activity and then record the new data from the revised activity. The editor would edit the activity within the admin panel.

Requirements

  • Editors can change any part of the protocol that is covered in the activity set builder:
    • Protocol Name & Description
    • Activity Name, Description, Preamble, Shuffle item order, and Allow items to be skipped,
    • Item Name, Description, Question and Input Type
  • Added items are simply added to the protocol
  • Deleted items are removed from the protocol
  • Edited items are updated to the new content inputted
  • User is shown a version number and the history of changes is displayed on admin about the applet
    • The applet starts at 1.0 and moves up 1.01, 1.02, etc
    • Between each version, the history of changes is shown
      • Applet Name name was changed to New Name
      • *Applet name"'s description has changed to New Name
      • Activity Name changed to New Name
      • Activity Name was deleted
      • Activity name's description has changed to New Name
      • Activity name's preamble was changed to New preamble
      • Shuffle of Activity's Name order was turned on
      • Shuffle of Activity's Name order was turned off
      • Allow skipping of items turned on for Activity's name
      • Allow skipping of items turned off for Activity's name
      • Question name added with input name type
      • Question name deleted with input name type
      • Question name changed to New question name
      • Question name changed from input name type to input name type
        - Changed to radio, multiple choice or slider show the new input options (i.e. Multiple choice - 1. Ate breakfast 2. Ate Lunch 3. Ate Dinner)
        - All other options just show the input type name change
      • Item name changed from item name to new item name
      • Item name's description was changed from item name's description to new item name's description
      • Item name was removed
  • Save Changes to Existing Applet: By saving a protocol that is in progress (applet has users and schedules defined), the applet is overwritten with the new data.
  • The existing data is still stored with the original criterion
  • Changes are not made to the users or schedule of the original applet
  • The user would see the 'same applet' but with the new changes made

Acceptance Criteria
Given I am an editor
When I select an applet from my dashboard
Then I am able to edit activities and items of that applet

Given I am an editor
When I am editing an activity
Then I am able to add and remove items as well as change content within the original items.

Notification Not Received

Expected Results: Setup notification at a specific time and phone would receive notificatin
Actual Results: Notification set for 02:56PM on Janurary 9th 2020 and nothing happened

mindlogger-admin (8).png

Allow applets to be grouped in folders

As an organizer role, I want to be able to group applets in folders so that I can better organize my dashboard

Requirements:

  • Allow a user to create a folder and name it whatever he or she wants
    • Folders can have the same name
  • Allow a user to edit the folder name
  • Allow user to drag and drop an applet into or out of the folder
  • Pinning an item in the folder only affects the order in the pinned folder
  • If the user attempts to delete an applet folder with applets inside, display "You cannot delete a folder that contains applets. Please remove applets from this folder and try again."
  • If the user attempts to delete an applet folder without applets inside, then remove the folder from the list
  • Folders are always at the top above pinned applets.

Applet Folders.png

Allow Protocol Builder to use skip option

@WorldImpex commented on Sat Feb 08 2020

As a protocol builder, I want to use a skip option when I am creating a protocol so that user do not have to answer every question.

Requirements: When a protocol is being built, the builder should be able to give the user an option to skip the item(question). This should be an ability with each question. The skip will allow the user to not answer the item (question) and move onto the next.

Acceptance Criteria:
Given I am a user
When I am taking an assessment
Then where appropriate, I can skip a question

Given I am a protocol builder
When I am creating an assessment
Then I can choose to give the user an option to skip that item.

🐛 Can't continue to calendar

On the new user management view, I don't know how to get it to let me advance to the schedule view. The continue button seems to be always greyed out.
user management screenshot

Keep protocol on the app when downloaded

As an editor, I want to download the protocol without the builder resetting so that I can sample what I have created in-app and make changes in the builder at the same time.

Requirements:

  • Allow the user to download the protocol without the builder resetting itself

** Below is original ask for reference**

Currently the protocol disappears when one hits the download button. It would be great if:

a. the protocol could remain in the app
b. there was an open protocol option where the downloaded protocol could be uploaded and re-edited. (Being developed in #201 & #121)

After Selecting Save Nothing Happens

Expected Results: User is shown confirmation that activities are saved.
Actual Results: Nothing happens so user does not know if save was successful or not

mindlogger-admin (6).png

Discovery: Shibboleth Integration

We need to scope the effort it would take to integrate shibboleth into ML

  1. Define what complications it causes
  2. Will there be a way for the shibboleth instance to work with the rest of the ecosystem?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.