renalware-core 2.0.142 → 2.0.143

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/renalware/components/dialogs.js.erb +2 -2
  3. data/app/assets/javascripts/renalware/core.js.erb +2 -2
  4. data/app/assets/javascripts/renalware/rollup_compiled.js +10 -67
  5. data/app/assets/stylesheets/renalware/core.scss +1 -1
  6. data/app/assets/stylesheets/renalware/modules/_clinical.scss +13 -0
  7. data/app/assets/stylesheets/renalware/partials/_trix.scss +11 -0
  8. data/app/controllers/renalware/medications/prescriptions_controller.rb +5 -3
  9. data/app/controllers/renalware/patients/alerts_controller.rb +3 -1
  10. data/app/inputs/trix_editor_input.rb +14 -0
  11. data/app/javascript/renalware/controllers/medications/home_delivery_modal_controller.js +2 -2
  12. data/app/javascript/renalware/index.js +0 -6
  13. data/app/models/renalware/patients/alert.rb +1 -0
  14. data/app/views/renalware/accesses/procedures/_form.html.slim +1 -1
  15. data/app/views/renalware/admissions/admissions/_form.html.slim +2 -1
  16. data/app/views/renalware/admissions/requests/_request.html.slim +0 -2
  17. data/app/views/renalware/clinics/clinic_visits/_form.html.slim +1 -1
  18. data/app/views/renalware/events/events/_form.html.slim +1 -1
  19. data/app/views/renalware/letters/letters/_form.html.slim +1 -3
  20. data/app/views/renalware/medications/prescriptions/index.html.slim +10 -13
  21. data/app/views/renalware/patients/alerts/_alert.html.slim +8 -2
  22. data/app/views/renalware/patients/alerts/_form.html.slim +4 -1
  23. data/app/views/renalware/pd/peritonitis_episodes/edit.js.erb +1 -0
  24. data/app/views/renalware/pd/peritonitis_episodes/update.js.erb +1 -1
  25. data/app/views/renalware/snippets/snippets/_form.html.slim +1 -1
  26. data/app/views/renalware/snippets/snippets/index.js.erb +0 -1
  27. data/app/views/renalware/system/email_templates/index.html.slim +0 -4
  28. data/app/views/renalware/system/messages/_form.html.slim +2 -1
  29. data/db/migrate/20200316131136_add_covid_19_to_patient_alerts.rb +7 -0
  30. data/lib/renalware/engine.rb +0 -1
  31. data/lib/renalware/version.rb +1 -1
  32. data/spec/support/factory_bot.rb +1 -0
  33. data/spec/support/pages/medications/home_delivery_dialog.rb +2 -2
  34. data/spec/support/pages/medications/prescription_fom.rb +8 -0
  35. metadata +5 -6
  36. data/app/assets/stylesheets/renalware/partials/_editor.scss +0 -47
  37. data/app/javascript/renalware/controllers/another_test_controller.js +0 -8
  38. data/app/javascript/renalware/controllers/foundation_modal_controller.js +0 -19
  39. data/app/javascript/renalware/controllers/test_controller.js +0 -8
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 97fa40a78473a91cbd6af1cd8ac758f4bc28f1766da786297478cca142196ca2
4
- data.tar.gz: 79a9c514757ce61ec8a36879fd9c19e46d1617c84b97f63780c9bf56ecdd1a25
3
+ metadata.gz: 4cb7d60384fbf68383c1160af8d367f348a292dac568ec324d2149fa5131d288
4
+ data.tar.gz: 9c91c199d79f644bcb93de90558bb7a3b7f176119c6167beb2a3c51927bf03bc
5
5
  SHA512:
6
- metadata.gz: ba280c4668d9dadde37256b3a41847c287e4a96a337d841d908cc1b750b88014bf6e44b2f7a0dd75074d375a28fb8a51c0ad4b6fb00799210e107594d16665ed
7
- data.tar.gz: 905203a234284ff12bf37ecbbd290e6b386569f58dd65012afb692a48ba6cd3b20f03baeed21a08829269c141ed7fb6e085bca676a00ed6536807b59061ab953
6
+ metadata.gz: d26f5db9d00643f130bb63f9134ecaa15b13c300a1723aaaa2a272d4144917bcdec886f0db2d9072413af64cf70996fdc11f52e600d9fae7a4a3dae355a396d5
7
+ data.tar.gz: dda49e2a4f3ea966327e8922263856ff918924a28ebed6b3b5c8326d75172d803e70bd7d373335217bfe6fa2b01cd856ba49911a725b72dca2f9f0432d65394f
@@ -18,7 +18,7 @@ $(document).on('opened.fndtn.reveal', '[data-reveal]', function () {
18
18
  $('form[data-client-side-validations]').enableClientSideValidations();
19
19
  $('.searchable_select', modal).select2();
20
20
  // If a modal is launched again, ensure the submit button is re-enabled.
21
- $.rails.enableFormElement($('input[data-disable-with]'));
21
+ Rails.enableElement($('input[data-disable-with]')[0]);
22
22
  // Refresh layout of foundation widgets
23
23
  $(document).foundation('reflow');
24
24
 
@@ -29,5 +29,5 @@ $(document).on('opened.fndtn.reveal', '[data-reveal]', function () {
29
29
 
30
30
  // If there was an error submitting a modal form, be sure to re-enable the submit button
31
31
  $(document).on('ajaxError', function(event, xhr, status, error) {
32
- $.rails.enableFormElement($('input[data-disable-with]'));
32
+ Rails.enableElement($('input[data-disable-with]'))[0];
33
33
  });
@@ -13,13 +13,12 @@
13
13
  // Not that jquery3 is not currently compatible for foundation 5
14
14
  //= require jquery2
15
15
  //= require jquery-readyselector
16
- //= require jquery_ujs
16
+ //= require rails-ujs
17
17
  //= require jquery-ui/core
18
18
  //= require jquery-ui/widgets/sortable
19
19
  //= require jquery-ui/effects/effect-highlight
20
20
  //= require dataTables/jquery.dataTables
21
21
  //= require dataTables/jquery.dataTables.foundation
22
- //= require trix
23
22
  //= require foundation/foundation
24
23
  //= require foundation/foundation.accordion
25
24
  //= require foundation/foundation.alert
@@ -43,6 +42,7 @@
43
42
  //= require rails.validations.simple_form
44
43
  //= require print-js/dist/print
45
44
  //= require moment/moment
45
+ //= require trix/dist/trix
46
46
  //= require_directory ./components
47
47
 
48
48
  // This next file is compiled by rollup using files in app/javascripts.
@@ -3782,39 +3782,9 @@ function _possibleConstructorReturn(self, call) {
3782
3782
  return _assertThisInitialized(self);
3783
3783
  }
3784
3784
 
3785
- var _default = function(_Controller) {
3786
- _inherits(_default, _Controller);
3787
- function _default() {
3788
- _classCallCheck(this, _default);
3789
- return _possibleConstructorReturn(this, _getPrototypeOf(_default).apply(this, arguments));
3790
- }
3791
- _createClass(_default, [ {
3792
- key: "connect",
3793
- value: function connect() {
3794
- this.element.textContent = "TestController connected.";
3795
- }
3796
- } ]);
3797
- return _default;
3798
- }(Controller);
3799
-
3800
- var _default$1 = function(_Controller) {
3801
- _inherits(_default, _Controller);
3802
- function _default() {
3803
- _classCallCheck(this, _default);
3804
- return _possibleConstructorReturn(this, _getPrototypeOf(_default).apply(this, arguments));
3805
- }
3806
- _createClass(_default, [ {
3807
- key: "connect",
3808
- value: function connect() {
3809
- this.element.textContent = "AnotherTestController connected";
3810
- }
3811
- } ]);
3812
- return _default;
3813
- }(Controller);
3814
-
3815
3785
  var $ = window.$;
3816
3786
 
3817
- var _default$2 = function(_Controller) {
3787
+ var _default = function(_Controller) {
3818
3788
  _inherits(_default, _Controller);
3819
3789
  function _default() {
3820
3790
  _classCallCheck(this, _default);
@@ -3848,7 +3818,7 @@ var _default$2 = function(_Controller) {
3848
3818
 
3849
3819
  var $$1 = window.$;
3850
3820
 
3851
- var _default$3 = function(_Controller) {
3821
+ var _default$1 = function(_Controller) {
3852
3822
  _inherits(_default, _Controller);
3853
3823
  function _default() {
3854
3824
  _classCallCheck(this, _default);
@@ -3875,11 +3845,11 @@ var _default$3 = function(_Controller) {
3875
3845
  return _default;
3876
3846
  }(Controller);
3877
3847
 
3878
- _defineProperty(_default$3, "targets", [ "container", "radio" ]);
3848
+ _defineProperty(_default$1, "targets", [ "container", "radio" ]);
3879
3849
 
3880
- var $$2 = window.$;
3850
+ var Rails = window.Rails;
3881
3851
 
3882
- var _default$4 = function(_Controller) {
3852
+ var _default$2 = function(_Controller) {
3883
3853
  _inherits(_default, _Controller);
3884
3854
  function _default() {
3885
3855
  _classCallCheck(this, _default);
@@ -3888,7 +3858,7 @@ var _default$4 = function(_Controller) {
3888
3858
  _createClass(_default, [ {
3889
3859
  key: "refreshForm",
3890
3860
  value: function refreshForm() {
3891
- $$2(this.formTarget[0]).trigger("submit.rails");
3861
+ Rails.fire(this.formTarget, "submit");
3892
3862
  }
3893
3863
  }, {
3894
3864
  key: "askForPrintFeedback",
@@ -3900,39 +3870,12 @@ var _default$4 = function(_Controller) {
3900
3870
  return _default;
3901
3871
  }(Controller);
3902
3872
 
3903
- _defineProperty(_default$4, "targets", [ "form", "printOptions", "printFeedback" ]);
3904
-
3905
- var $$3 = window.$;
3906
-
3907
- var _default$5 = function(_Controller) {
3908
- _inherits(_default, _Controller);
3909
- function _default() {
3910
- _classCallCheck(this, _default);
3911
- return _possibleConstructorReturn(this, _getPrototypeOf(_default).apply(this, arguments));
3912
- }
3913
- _createClass(_default, [ {
3914
- key: "openRemotePartial",
3915
- value: function openRemotePartial() {
3916
- $$3(this.containerTarget).html("");
3917
- var url = this.data.get("url");
3918
- $$3(this.containerTarget).load(url).foundation("reveal", "open");
3919
- }
3920
- } ]);
3921
- return _default;
3922
- }(Controller);
3923
-
3924
- _defineProperty(_default$5, "targets", [ "container" ]);
3873
+ _defineProperty(_default$2, "targets", [ "form", "printOptions", "printFeedback" ]);
3925
3874
 
3926
3875
  var application = Application.start();
3927
3876
 
3928
- application.register("test", _default);
3929
-
3930
- application.register("another_test", _default$1);
3931
-
3932
- application.register("toggle", _default$2);
3933
-
3934
- application.register("foundation-modal", _default$5);
3877
+ application.register("toggle", _default);
3935
3878
 
3936
- application.register("hd-prescription-administration", _default$3);
3879
+ application.register("hd-prescription-administration", _default$1);
3937
3880
 
3938
- application.register("home-delivery-modal", _default$4);
3881
+ application.register("home-delivery-modal", _default$2);
@@ -9,7 +9,7 @@
9
9
  @import "font-awesome";
10
10
  @import "foundation-datepicker/css/foundation-datepicker";
11
11
  @import "dataTables/jquery.dataTables.foundation";
12
- @import "trix";
12
+ @import "trix/dist/trix";
13
13
  @import "balloon-css/src/balloon";
14
14
  @import "./lib/foundation_and_overrides";
15
15
  @import "./lib/clockpicker";
@@ -173,6 +173,19 @@ article.clinical-allergies {
173
173
  }
174
174
  }
175
175
 
176
+ &.covid_19 {
177
+ background-color: $nhs-yellow;
178
+ color: $dark-grey;
179
+
180
+ &:hover {
181
+ background-color: darken($nhs-yellow, 7);
182
+ }
183
+
184
+ .actions i:before {
185
+ color: $dark-grey;
186
+ }
187
+ }
188
+
176
189
  &.research-study-participant {
177
190
  background-color: darken($nhs-green, 3);
178
191
  color: $white;
@@ -0,0 +1,11 @@
1
+ trix-toolbar {
2
+ display: inline-block;
3
+
4
+ .trix-button-group--file-tools,
5
+ .trix-button--icon-heading-1,
6
+ .trix-button--icon-code,
7
+ .trix-button--icon-quote
8
+ {
9
+ display: none;
10
+ }
11
+ }
@@ -2,6 +2,7 @@
2
2
 
3
3
  require_dependency "renalware/medications"
4
4
 
5
+ # rubocop:disable Metrics/ClassLength
5
6
  module Renalware
6
7
  module Medications
7
8
  class PrescriptionsController < BaseController
@@ -73,7 +74,7 @@ module Renalware
73
74
  render :index, locals: locals
74
75
  end
75
76
 
76
- # rubocop:disable Layout/LineLength
77
+ # rubocop:disable Layout/LineLength, Metrics/MethodLength
77
78
  def render_prescriptions_list_to_hand_to_patient
78
79
  render(
79
80
  pdf_options.merge(
@@ -89,7 +90,7 @@ module Renalware
89
90
  )
90
91
  )
91
92
  end
92
- # rubocop:enable Layout/LineLength
93
+ # rubocop:enable Layout/LineLength, Metrics/MethodLength
93
94
 
94
95
  def pdf_filename
95
96
  "#{patient.family_name}_#{patient.hospital_identifier&.id}" \
@@ -147,7 +148,7 @@ module Renalware
147
148
  [
148
149
  :drug_id, :dose_amount, :dose_unit, :medication_route_id, :frequency,
149
150
  :administer_on_hd, :route_description, :notes, :prescribed_on, :provider,
150
- :last_delivery_date, { termination_attributes: :terminated_on }
151
+ :last_delivery_date, :next_delivery_date, { termination_attributes: :terminated_on }
151
152
  ]
152
153
  end
153
154
 
@@ -222,3 +223,4 @@ module Renalware
222
223
  end
223
224
  end
224
225
  end
226
+ # rubocop:enable Metrics/ClassLength
@@ -15,6 +15,8 @@ module Renalware
15
15
  # POST js
16
16
  def create
17
17
  alert = Alert.new(alert_params.merge!(by: user, patient: patient))
18
+ alert.urgent = alert_params[:urgency] == "urgent"
19
+ alert.covid_19 = alert_params[:urgency] == "covid_19"
18
20
  authorize alert
19
21
  if alert.save
20
22
  render locals: { patient: patient, alert: alert }
@@ -55,7 +57,7 @@ module Renalware
55
57
  end
56
58
 
57
59
  def alert_params
58
- params.require(:patients_alert).permit(:notes, :urgent)
60
+ params.require(:patients_alert).permit(:notes, :urgency)
59
61
  end
60
62
  end
61
63
  end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ # See https://github.com/kylefox/trix/blob/master/lib/trix/simple_form/trix_editor_input.rb
4
+ class TrixEditorInput < SimpleForm::Inputs::Base
5
+ def input(_wrapper_options)
6
+ trix_options = options.slice(:spellcheck, :toolbar, :tabindex, :input, :class)
7
+ editor_options = { input: input_class, class: "trix-content" }.merge(trix_options)
8
+
9
+ editor_tag = template.content_tag("trix-editor", "", editor_options)
10
+ hidden_field = @builder.hidden_field(attribute_name, input_html_options)
11
+
12
+ template.content_tag("div", hidden_field + editor_tag, class: "trix-editor-wrapper")
13
+ end
14
+ end
@@ -1,4 +1,4 @@
1
- const $ = window.$
1
+ const Rails = window.Rails
2
2
  import { Controller } from "stimulus"
3
3
 
4
4
  // Handles the modal dialog used for presenting Home Delivery print options to
@@ -9,7 +9,7 @@ export default class extends Controller {
9
9
  // Submit and re-display the form when 'drug type' or 'prescription duration'
10
10
  // dropdowns are changed
11
11
  refreshForm() {
12
- $(this.formTarget[0]).trigger("submit.rails")
12
+ Rails.fire(this.formTarget, "submit")
13
13
  }
14
14
 
15
15
  // When the user has clicked Print (launching the PDF in a new tab), hide
@@ -13,17 +13,11 @@ import { Application } from "stimulus"
13
13
  // (via the polyfill) for new js development, and the remaining js can be ported or moved at some
14
14
  // point in the future.
15
15
  // The rollupjs setup from adapted from the approach used by ActiveStorage
16
- import TestController from "./controllers/test_controller"
17
- import AnotherTestController from "./controllers/another_test_controller"
18
16
  import ToggleController from "./controllers/toggle_controller"
19
17
  import HDPrescriptionController from "./controllers/hd/prescription_administration_controller"
20
18
  import MedicationsHomeDeliveryModalController from "./controllers/medications/home_delivery_modal_controller"
21
- import FoundationModalController from "./controllers/foundation_modal_controller"
22
19
 
23
20
  const application = Application.start()
24
- application.register("test", TestController)
25
- application.register("another_test", AnotherTestController)
26
21
  application.register("toggle", ToggleController)
27
- application.register("foundation-modal", FoundationModalController)
28
22
  application.register("hd-prescription-administration", HDPrescriptionController)
29
23
  application.register("home-delivery-modal", MedicationsHomeDeliveryModalController)
@@ -8,6 +8,7 @@ module Renalware
8
8
  include Accountable
9
9
  acts_as_paranoid
10
10
 
11
+ attr_accessor :urgency # for use in forms
11
12
  validates :patient, presence: true
12
13
  validates :notes, presence: true
13
14
 
@@ -27,7 +27,7 @@ ruby:
27
27
  - target = "procedure-notes-editor"
28
28
  = f.label :notes
29
29
  = snippets_modal_and_link_to_open_it(target_input_for_seleted_snippet: ".#{target}")
30
- = f.trix_editor :notes, class: target
30
+ = f.input :notes, as: :trix_editor, class: target, wrapper: :zilch
31
31
  br
32
32
  = f.input :catheter_make, wrapper: :horizontal_small
33
33
  = f.input :catheter_lot_no, wrapper: :horizontal_small
@@ -41,7 +41,8 @@
41
41
  wrapper: :horizontal_medium
42
42
  = f.input :summarised_on, as: :date_picker, wrapper: :horizontal_datepicker
43
43
  = snippets_modal_and_link_to_open_it(target_input_for_seleted_snippet: ".discharge-summary")
44
- = f.trix_editor :discharge_summary, class: "discharge-summary"
44
+ = f.label :discharge_summary
45
+ = f.input :discharge_summary, as: :trix_editor, class: "discharge-summary", wrapper: :zilch
45
46
 
46
47
  = f.submit class: :button
47
48
  span= " or "
@@ -27,8 +27,6 @@ ruby:
27
27
  | &nbsp;|&nbsp;&nbsp;
28
28
  = link_to "Edit",
29
29
  edit_admissions_request_path(request, format: :html),
30
- remote: true,
31
- method: :get,
32
30
  data: { "reveal-id" => "admissions-request-modal", "reveal-ajax" => "true" }
33
31
  td.handle
34
32
  i.fas.fa-bars
@@ -43,7 +43,7 @@
43
43
  .columns.large-12
44
44
  - target = ".clinic-visit-notes-editor"
45
45
  = snippets_modal_and_link_to_open_it(target_input_for_seleted_snippet: target)
46
- = f.trix_editor :notes, class: "clinic-visit-notes-editor"
46
+ = f.input :notes, as: :trix_editor, class: "clinic-visit-notes-editor", wrapper: :zilch
47
47
 
48
48
  fieldset
49
49
  legend Admin Notes
@@ -28,7 +28,7 @@
28
28
 
29
29
  = f.label :notes
30
30
  = snippets_modal_and_link_to_open_it(target_input_for_seleted_snippet: ".event-notes")
31
- = f.trix_editor :notes, class: "event-notes"
31
+ = f.input :notes, as: :trix_editor, class: "event-notes", wrapper: :zilch
32
32
  = f.error :notes
33
33
  br
34
34
 
@@ -43,8 +43,6 @@ ruby:
43
43
  h2 Message
44
44
 
45
45
  = f.input :salutation
46
-
47
- = f.label :body
48
46
  = snippets_modal_and_link_to_open_it(target_input_for_seleted_snippet: ".letter-body-editor")
49
47
 
50
48
  - if event&.respond_to?(:notes)
@@ -53,7 +51,7 @@ ruby:
53
51
  data: { notes: event.notes || "", target: ".letter-body-editor" },
54
52
  class: "insert-data-notes button alternative right editor-toolbar-button"
55
53
 
56
- = f.trix_editor :body, class: "letter-body-editor"
54
+ = f.input :body, as: :trix_editor, class: "letter-body-editor", wrapper: :zilch
57
55
 
58
56
  article
59
57
  header
@@ -13,19 +13,16 @@
13
13
  | Print
14
14
  |&nbsp;
15
15
 
16
- span(data-controller="foundation-modal",
17
- data-foundation-modal-url=new_patient_medications_home_delivery_event_path(patient))
18
- = link_to "#",
19
- class: "button secondary with-icon",
20
- id: "show-home-delivery-modal",
21
- data: { action: "click->foundation-modal#openRemotePartial" } do
22
- i.fa.fa-print
23
- | Print home delivery drugs
24
- #print-home-delivery-drugs-modal.reveal-modal.small(data-reveal
25
- data-refresh-url=request.original_fullpath
26
- data-target="foundation-modal.container"
27
- data-controller="home-delivery-modal"
28
- data-home-delivery-url1=new_patient_medications_home_delivery_event_url(@patient))
16
+ / link to open the modal
17
+ = link_to new_patient_medications_home_delivery_event_path(patient),
18
+ class: "button secondary with-icon",
19
+ data: { "reveal-id" => "print-home-delivery-drugs-modal", "reveal-ajax" => "true" } do
20
+ i.fa.fa-print
21
+ | Print home delivery drugs
22
+
23
+ / modal placeholder
24
+ #print-home-delivery-drugs-modal.reveal-modal.small(data-reveal
25
+ data-controller="home-delivery-modal")
29
26
 
30
27
  = within_patient_layout(title: "Prescriptions") do
31
28
  = render "filter_form", search: current_search, drug_types: drug_types, treatable: treatable
@@ -1,6 +1,12 @@
1
- li.patient-alert(class=("urgent" if alert.urgent) id="alert-#{alert.id}")
1
+ ruby:
2
+ klasses = []
3
+ klasses << "covid_19" if alert.covid_19?
4
+ klasses << "urgent" if alert.urgent?
5
+ title = "Alert:"
6
+ title = "COVID-19 Alert:" if alert.covid_19?
7
+ li.patient-alert(class=(klasses.join(" ")) id="alert-#{alert.id}")
2
8
  i.fas.fa-exclamation-triangle
3
- span.title Alert:
9
+ span.title= title
4
10
  span.body= alert.notes
5
11
  span.author= alert.created_by.username
6
12
  span.date= l(alert.created_at.to_date)
@@ -4,7 +4,10 @@
4
4
  remote: true,
5
5
  url: patient_alerts_path(patient_id: patient) do |f|
6
6
  h2= t(".title")
7
- = f.input :urgent, as: :boolean, boolean_style: :inline
7
+ = f.input :urgency,
8
+ as: :radio_buttons,
9
+ collection: [[" URGENT","urgent"], [" COVID-19", "covid_19"]],
10
+ label: false
8
11
  = f.input :notes, autofocus: true
9
12
  = f.submit "Create alert", class: :button
10
13
  span= " or "
@@ -3,3 +3,4 @@ $(el).html("<%= escape_javascript(
3
3
  render "form", local_assigns
4
4
  ) %>");
5
5
  initDatepickersIn(el);
6
+ $("#peritonitis_episode_types .searchable_select").select2();
@@ -9,5 +9,5 @@ var el = "<%= "#" + dom_id(peritonitis_episode) %>";
9
9
  render "form", local_assigns
10
10
  ) %>");
11
11
  initDatepickersIn(el);
12
-
12
+ $("#peritonitis_episode_types .searchable_select").select2();
13
13
  <% end %>
@@ -10,7 +10,7 @@
10
10
  .small-12.medium-4.large-3.columns
11
11
  = f.label :body
12
12
  .small-12.medium-8.large-9.columns
13
- = f.trix_editor :body
13
+ = f.input :body, as: :trix_editor, wrapper: :zilch
14
14
 
15
15
  = f.submit "Save", class: "button"
16
16
  = " or "
@@ -15,7 +15,6 @@ $('.snippets').on('click', 'th a, .pagination a', function () {
15
15
 
16
16
  initTogglers();
17
17
 
18
- // The
19
18
  $('.insert-snippet').on('click', function (e) {
20
19
  var modal = $("#snippets-modal");
21
20
  var snippetBody = $(this).parent().closest("tr").find(".body").html();
@@ -9,7 +9,3 @@
9
9
 
10
10
  dt= link_to "User Reactivated Email", "/rails/mailers/renalware/admin/user_mailer/unexpiry"
11
11
  dd Sent when an administrator reactivates a deactivated user.
12
-
13
- / You can remove this
14
- .xxx(data-controller="test")
15
- .xxx(data-controller="another_test")
@@ -6,7 +6,8 @@
6
6
  = render "renalware/shared/errors", model: f.object
7
7
 
8
8
  = f.input :title, placeholder: "An optional title"
9
- = f.trix_editor :body, wrapper: :horizontal_large
9
+ = f.label :body
10
+ = f.input :body, as: :trix_editor, wrapper: :zilch
10
11
  br
11
12
  = f.input :severity,
12
13
  collection: severities,
@@ -0,0 +1,7 @@
1
+ class AddCovid19ToPatientAlerts < ActiveRecord::Migration[5.2]
2
+ def change
3
+ within_renalware_schema do
4
+ add_column :patient_alerts, :covid_19, :boolean, null: false, default: false
5
+ end
6
+ end
7
+ end
@@ -52,7 +52,6 @@ require "ruby-hl7"
52
52
  require "sass-rails"
53
53
  require "scenic"
54
54
  require "slim-rails"
55
- require "trix"
56
55
  require "uglifier"
57
56
  require "validates_timeliness"
58
57
  require "virtus"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Renalware
4
- VERSION = "2.0.142"
4
+ VERSION = "2.0.143"
5
5
  end
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  RSpec.configure do |config|
4
+ FactoryBot.use_parent_strategy = false
4
5
  FactoryBot.definition_file_paths = Array(Renalware::Engine.root.join("spec", "factories"))
5
6
  config.include FactoryBot::Syntax::Methods
6
7
 
@@ -57,8 +57,8 @@ module Pages
57
57
  end
58
58
  end
59
59
 
60
- def visible?
61
- page.has_css?("#print-home-delivery-drugs-modal .modal", visible: true)
60
+ def invisible?
61
+ page.has_no_css?("#print-home-delivery-drugs-modal .modal", visible: true)
62
62
  end
63
63
 
64
64
  def has_enabled_print_button?
@@ -38,6 +38,14 @@ module Pages
38
38
  fill_in "Prescribed on", with: value
39
39
  end
40
40
 
41
+ def last_delivery_date=(date)
42
+ fill_in "Last delivery date", with: date
43
+ end
44
+
45
+ def next_delivery_date=(date)
46
+ fill_in "Next delivery date", with: date
47
+ end
48
+
41
49
  def provider=(value)
42
50
  within(".medications_prescription_provider") do
43
51
  choose value
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: renalware-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.142
4
+ version: 2.0.143
5
5
  platform: ruby
6
6
  authors:
7
7
  - Airslie
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-10 00:00:00.000000000 Z
11
+ date: 2020-03-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionview-component
@@ -1160,7 +1160,6 @@ files:
1160
1160
  - app/assets/stylesheets/renalware/partials/_datepicker.scss
1161
1161
  - app/assets/stylesheets/renalware/partials/_disabled_block.scss
1162
1162
  - app/assets/stylesheets/renalware/partials/_document.scss
1163
- - app/assets/stylesheets/renalware/partials/_editor.scss
1164
1163
  - app/assets/stylesheets/renalware/partials/_errors.scss
1165
1164
  - app/assets/stylesheets/renalware/partials/_forms.scss
1166
1165
  - app/assets/stylesheets/renalware/partials/_highlight.scss
@@ -1181,6 +1180,7 @@ files:
1181
1180
  - app/assets/stylesheets/renalware/partials/_toggle.scss
1182
1181
  - app/assets/stylesheets/renalware/partials/_toggling.scss
1183
1182
  - app/assets/stylesheets/renalware/partials/_tooltip.scss
1183
+ - app/assets/stylesheets/renalware/partials/_trix.scss
1184
1184
  - app/assets/stylesheets/renalware/partials/_typography.scss
1185
1185
  - app/assets/stylesheets/renalware/partials/_utilities.scss
1186
1186
  - app/assets/stylesheets/renalware/pathology_request_forms.scss
@@ -1470,12 +1470,10 @@ files:
1470
1470
  - app/inputs/inline_radio_buttons_input.rb
1471
1471
  - app/inputs/select_container_input.rb
1472
1472
  - app/inputs/simple_time_input.rb
1473
+ - app/inputs/trix_editor_input.rb
1473
1474
  - app/inputs/user_picker_input.rb
1474
- - app/javascript/renalware/controllers/another_test_controller.js
1475
- - app/javascript/renalware/controllers/foundation_modal_controller.js
1476
1475
  - app/javascript/renalware/controllers/hd/prescription_administration_controller.js
1477
1476
  - app/javascript/renalware/controllers/medications/home_delivery_modal_controller.js
1478
- - app/javascript/renalware/controllers/test_controller.js
1479
1477
  - app/javascript/renalware/controllers/toggle_controller.js
1480
1478
  - app/javascript/renalware/index.js
1481
1479
  - app/jobs/application_job.rb
@@ -3859,6 +3857,7 @@ files:
3859
3857
  - db/migrate/20200301124200_create_medication_delivery_events.rb
3860
3858
  - db/migrate/20200301124300_create_medication_delivery_event_prescriptions.rb
3861
3859
  - db/migrate/20200306183423_add_next_delivery_date_to_prescriptions.rb
3860
+ - db/migrate/20200316131136_add_covid_19_to_patient_alerts.rb
3862
3861
  - db/seeds.rb
3863
3862
  - db/seeds/default/accesses/access_pd_catheter_insertion_techniques.csv
3864
3863
  - db/seeds/default/accesses/access_pd_catheter_insertion_techniques.rb
@@ -1,47 +0,0 @@
1
- trix-toolbar {
2
- background-color: #fff;
3
-
4
- .button_row {
5
- display: inline-block;
6
-
7
- .button_group {
8
- -webkit-justify-content: initial;
9
- border: 0;
10
- display: inline-block;
11
- margin: 0;
12
-
13
- button {
14
- background-color: transparent;
15
- border: 0;
16
- margin: 0.5rem 0.2rem 0;
17
- padding: 0.2rem;
18
- }
19
- }
20
- }
21
-
22
- // Hide Trix buttons we don't use
23
- button.icon {
24
- &.heading-1,
25
- &.code,
26
- &.link,
27
- &.quote,
28
- &.nesting-level {
29
- display: none;
30
- }
31
- }
32
-
33
- .button_group button.icon,
34
- .button_group input[type="button"].icon {
35
- height: auto;
36
- opacity: 0.9; // prevent fuzzy SVGs in IE11
37
- }
38
- }
39
-
40
- trix-editor {
41
- border-color: #ccc;
42
- border-radius: 0;
43
- border-style: solid;
44
- border-width: 1px;
45
- box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
46
- padding: 0.6em 0.9em;
47
- }
@@ -1,8 +0,0 @@
1
- import { Controller } from "stimulus"
2
-
3
- // A test controller to establish that rollup + stimulus + babel are working
4
- export default class extends Controller {
5
- connect() {
6
- this.element.textContent = "AnotherTestController connected"
7
- }
8
- }
@@ -1,19 +0,0 @@
1
- const $ = window.$
2
- import { Controller } from "stimulus"
3
-
4
- // Controller for handling Foundation 'reveal' dialogs.
5
- // Assumes jQuery and foundation/reveal available.
6
- // The .container target is the html element the .reveal-modal class into which
7
- // the remote content will be loaded. Using a named target rather finding
8
- // .reveal-modal in case there are nested modal-controllers and >1 of this
9
- // elements exist in scope.
10
- export default class extends Controller {
11
- static targets = [ "container" ]
12
-
13
- // Open a dialog using a url to load a partial via ajax.
14
- openRemotePartial() {
15
- $(this.containerTarget).html("") // prevent old content from being initially re-displayed
16
- const url = this.data.get("url")
17
- $(this.containerTarget).load(url).foundation("reveal", "open")
18
- }
19
- }
@@ -1,8 +0,0 @@
1
- import { Controller } from "stimulus"
2
-
3
- // A test controller to establish that rollup + stimulus + babel are working
4
- export default class extends Controller {
5
- connect() {
6
- this.element.textContent = "TestController connected."
7
- }
8
- }