Skip to content

Commit

Permalink
Fix Activities on Dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
camillavk committed Jan 19, 2021
1 parent d600307 commit bafdef9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 40 deletions.
37 changes: 1 addition & 36 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Kuwinda
# MissionKontrol

## Quickstart

Expand Down Expand Up @@ -63,15 +63,6 @@ make bash
bundle exec rails db:reset
```

### Working with the dummy client database

If the dummy client database has been emptied for whatever reason, you can run the seeds to fill it again with:

```sh
make bash
bundle exec rake dummy_client_database:seeds
```

### Working with Docker

#### Starting Docker
Expand Down Expand Up @@ -143,29 +134,3 @@ NGINX Web Server configuration:
* `WEB_SERVER_PORT` - allows to override the default HTTP port - `80/tcp`;
* `WEB_SERVER_HTTPS_PORT` - allows to override the default HTTPS port - `443/tcp`;
* `WEB_SERVER_STATIC_FILES` - enables serving static files by web server - should be used in combination with `RAILS_ENV=production` and `RAILS_SERVE_STATIC_FILES=true`.

### Twilio configuration

In order to use twilio there are four pieces of information required. They are
* Account SID
* Application SID
* Auth token
* Caller ID

They can all be found in your twilio dashboard. Here is how to retrieve them.

#### Account SID and Auth token

Dashboard > Settings > Under API credentials you can find your account SID and auth token

#### Application SID

Dashboard > Programmable voice > TwiML > TwiML Apps > Create new app or choose existing app > Application SID can be found under properties

#### Caller ID

Dashboard > Programmable voice > Numbers > Mange numbers > select existing number or buy new number

## Permissions

subject_id = database_id
8 changes: 5 additions & 3 deletions app/assets/javascripts/page_specific/tables.js
Original file line number Diff line number Diff line change
Expand Up @@ -340,13 +340,14 @@ function activityItem (data) {
"</tr>";
}

function submitActivityForm (data) {
function submitActivityForm (data, databaseId) {
let formData = {
feedable_type: data.outcome.task_queue_item_table,
feedable_id: parseInt(data.outcome.task_queue_item_primary_key),
kind: "outcome",
user_id: data.user_id,
content: data.outcome_content
content: data.outcome_content,
database_id: databaseId
};

$.ajax({
Expand Down Expand Up @@ -382,6 +383,7 @@ function applyOutcomeRule () {
let primaryKey = location.pathname.substr(1).split("/")[2].split("?")[0];
let outcome = $(this).data("outcome");
let taskQueueId = $(this).data("task-queue-id");
let databaseId = location.search.split("database_id=")[1].split("&")[0];
let url = "/task_queues/" + taskQueueId + "/outcome";

let data = {
Expand All @@ -401,7 +403,7 @@ function applyOutcomeRule () {
window.toastr.error("Something went wrong, please try again.");
},
success (data) {
submitActivityForm(data);
submitActivityForm(data, databaseId);
$(".task-queue--outcome-button-success").addClass("hide");
$(".task-queue--outcome-button-failure").addClass("hide");
window.toastr.success("Task queue outcome updated.");
Expand Down
2 changes: 1 addition & 1 deletion bin/configure-host/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Configure Host

The Bash script that automate and simplify Kuwinda server configuration.
The Bash script that automates and simplifies MissionKontrol server configuration.


## Script Options
Expand Down

0 comments on commit bafdef9

Please sign in to comment.