renalware-core 2.0.166 → 2.0.167

Sign up to get free protection for your applications and to get access to all the features.
Files changed (31) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/stylesheets/renalware/lib/_foundation_and_overrides.scss +1 -1
  3. data/app/assets/stylesheets/renalware/partials/_tables.scss +9 -0
  4. data/app/policies/renalware/events/advanced_care_plan_policy.rb +1 -1
  5. data/app/policies/renalware/events/clinical_frailty_score_policy.rb +1 -1
  6. data/app/policies/renalware/events/event_policy.rb +4 -0
  7. data/app/policies/renalware/events/investigation_policy.rb +5 -1
  8. data/app/policies/renalware/virology/vaccination_policy.rb +6 -1
  9. data/app/presenters/renalware/virology/dashboard_presenter.rb +1 -1
  10. data/app/views/renalware/clinics/appointments/index.html.slim +1 -2
  11. data/app/views/renalware/directory/people/_person.html.slim +1 -2
  12. data/app/views/renalware/events/events/_event.html.slim +16 -3
  13. data/app/views/renalware/events/events/_form.html.slim +1 -1
  14. data/app/views/renalware/events/events/_table.html.slim +1 -2
  15. data/app/views/renalware/events/events/edit.html.slim +10 -0
  16. data/app/views/renalware/events/events/new.html.slim +4 -4
  17. data/app/views/renalware/events/investigations/edit.html.slim +5 -11
  18. data/app/views/renalware/events/swabs/edit.html.slim +5 -11
  19. data/app/views/renalware/events/swabs/new.html.slim +5 -11
  20. data/app/views/renalware/hd/dialysers/index.html.slim +1 -2
  21. data/app/views/renalware/hd/ongoing_sessions/_session.html.slim +1 -2
  22. data/app/views/renalware/hospitals/units/index.html.slim +1 -2
  23. data/app/views/renalware/pd/infection_organisms/_table.html.slim +1 -2
  24. data/app/views/renalware/problems/notes/_table.html.slim +1 -2
  25. data/app/views/renalware/problems/problems/_current_table.html.slim +1 -2
  26. data/app/views/renalware/research/study_participants/_table.html.slim +2 -2
  27. data/app/views/renalware/transplants/donor_operations/_list.html.slim +1 -2
  28. data/app/views/renalware/transplants/recipient_operations/_list.html.slim +2 -3
  29. data/config/routes/events.rb +1 -1
  30. data/lib/renalware/version_number.rb +1 -1
  31. metadata +5 -18
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ac2d49cbce8125bf334c28dce8c0363c766aa0b4951509bab613eaf3c6c8cc10
4
- data.tar.gz: 795e74e0004088a1506766f9e468b1c67be68783c664ff228ff2bd6e98f0aca4
3
+ metadata.gz: aa22cd0095f51d9bc225561fa2560b535a6e2c1af7afc9b6c831577b62f8fff9
4
+ data.tar.gz: 32cff2bcf9bd90f1f08f79716c8541601e8ef7ad09f2c35f4daefa14df89a711
5
5
  SHA512:
6
- metadata.gz: 995cf6f9c31fc67b071e57a07f1235aeb2d86a357854a29bef6d794b9d2548a2ea485222af0bba4e6fae83cf0d8398f1b56026b9233a614c40c3a7d2e053ce3e
7
- data.tar.gz: edbc6fdf11d7aad748f713669ccdf1a4c9a6fbe0ffc8f9f0cda3fec4e7a8c875593b4c98e9983e2db331bc617ab26bb5741d1de480bc761c43e1e68f4085f32d
6
+ metadata.gz: a40adc5547969171c58e7216f2e26ddad7b841a23c2a3e9710353639142b307007fbc6c98886e9c140a656e97a26fcbf39c9ef9091220b32ff1edfc92afd67c9
7
+ data.tar.gz: b05d494e9d5565979f7dbd9e755202cb227c1e895e065f3aa81e2de68070c36d24f79fb7e6e78b41acd84db767c2ad7069f34477c797bad968d10c8bc9348ef6
@@ -454,7 +454,7 @@ $form-spacing: rem-calc(12);
454
454
  // $input-border-radius: $global-radius;
455
455
  // $input-disabled-bg: $gainsboro;
456
456
  // $input-disabled-cursor: $cursor-default-value;
457
- // $input-box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
457
+ $input-box-shadow: 0;
458
458
 
459
459
  // We use these to style the fieldset border and spacing.
460
460
  // $fieldset-border-style: solid;
@@ -37,6 +37,15 @@ td.actions {
37
37
  padding-left: 0;
38
38
  white-space: nowrap;
39
39
 
40
+ /* If the action link is just an icon, make it quite subtle so it does not draw attention */
41
+ > a.icon-only {
42
+ color: $link-hover-colour;
43
+
44
+ &:hover {
45
+ color: $link-colour;
46
+ }
47
+ }
48
+
40
49
  > a, > span {
41
50
  &:after {
42
51
  color: $pipe-separator-colour;
@@ -4,7 +4,7 @@ require_dependency "renalware/messaging"
4
4
 
5
5
  module Renalware
6
6
  module Events
7
- class AdvancedCarePlanPolicy < BasePolicy
7
+ class AdvancedCarePlanPolicy < EventPolicy
8
8
  end
9
9
  end
10
10
  end
@@ -4,7 +4,7 @@ require_dependency "renalware/messaging"
4
4
 
5
5
  module Renalware
6
6
  module Events
7
- class ClinicalFrailtyScorePolicy < BasePolicy
7
+ class ClinicalFrailtyScorePolicy < EventPolicy
8
8
  end
9
9
  end
10
10
  end
@@ -10,6 +10,10 @@ module Renalware
10
10
  false
11
11
  end
12
12
  alias update? edit?
13
+
14
+ def destroy?
15
+ false
16
+ end
13
17
  end
14
18
  end
15
19
  end
@@ -4,7 +4,11 @@ require_dependency "renalware/events"
4
4
 
5
5
  module Renalware
6
6
  module Events
7
- class InvestigationPolicy < BasePolicy
7
+ class InvestigationPolicy < EventPolicy
8
+ def edit?
9
+ true
10
+ end
11
+ alias update? edit?
8
12
  end
9
13
  end
10
14
  end
@@ -4,7 +4,12 @@ require_dependency "renalware/virology"
4
4
 
5
5
  module Renalware
6
6
  module Virology
7
- class VaccinationPolicy < BasePolicy
7
+ class VaccinationPolicy < Events::EventPolicy
8
+ def edit?
9
+ user_is_super_admin?
10
+ end
11
+ alias update? edit?
12
+ alias destroy? edit?
8
13
  end
9
14
  end
10
15
  end
@@ -26,7 +26,7 @@ module Renalware
26
26
  end
27
27
 
28
28
  def vaccinations
29
- Vaccination.for_patient(patient)
29
+ Vaccination.for_patient(patient).order(date_time: :desc)
30
30
  end
31
31
  end
32
32
  end
@@ -73,11 +73,10 @@
73
73
  - appointments.each do |appointment|
74
74
  tr
75
75
  td= check_box_tag nil, appointment.patient.id, true, class: "patient_checkbox"
76
- td.nowrap
76
+ td.nowrap.actions
77
77
  = link_to("Toggle",
78
78
  "#appointment-quick-preview-#{appointment.id}",
79
79
  data: { behaviour: "toggler" })
80
- = " | "
81
80
  - if appointment.becomes_visit_id.present?
82
81
  = link_to edit_patient_clinic_visit_path(appointment.patient,
83
82
  id: appointment.becomes_visit_id) do
@@ -1,7 +1,6 @@
1
1
  tr
2
- td
2
+ td.actions
3
3
  = link_to "View", directory_person_path(person)
4
- = pipe_separator
5
4
  = link_to "Edit", edit_directory_person_path(person)
6
5
  td= person.title
7
6
  td= link_to person.family_name, directory_person_path(person)
@@ -1,9 +1,22 @@
1
1
  - row_id = "#{toggle_prefix}-quick-preview-#{event.id}"
2
2
  tr
3
3
  td.noprint= toggler("##{row_id}")
4
- - if local_assigns[:edit_proc]
5
- td.noprint
6
- = link_to("Edit", edit_proc.call(event))
4
+ td.actions
5
+ / If the event supports editing (most don't as they are immuatble once created, to ensure a
6
+ / consistent clinical record), then use the supplied proc if passed (which will render a
7
+ / custom edit link (e.g. the Investigations event subclass, has its own slug, controllwe and
8
+ / and form) otherwise render a standard Event edit link.
9
+ - if policy(event).edit?
10
+ = link_to("Edit", local_assigns[:edit_proc] ? edit_proc.call(event) : edit_patient_event_path(event.patient, event))
11
+
12
+ - if policy(event).destroy?
13
+ - if local_assigns[:destroy_proc]
14
+ = link_to("Delete", destroy_proc.call(event))
15
+ - else
16
+ = link_to(patient_event_path(event.patient, event),
17
+ method: :delete,
18
+ data: { confirm: "Are you sure you want delete this event?\n" }) do
19
+ i.far.fa-trash-alt
7
20
 
8
21
  td.nowrap= l event.created_at.to_date
9
22
  - unless local_assigns[:exclude_type_column] == true
@@ -1,5 +1,5 @@
1
1
  = simple_form_for event,
2
- url: patient_events_path(patient, event),
2
+ url: url,
3
3
  as: :events_event,
4
4
  html: { autocomplete: "off" },
5
5
  wrapper: "horizontal_form" do |f|
@@ -4,8 +4,7 @@ table.has-togglable-rows.events-table
4
4
  thead
5
5
  tr
6
6
  th.noprint.togglers= table_toggler
7
- - if local_assigns[:edit_proc]
8
- th.col-width-tiny
7
+ th.col-width-tiny
9
8
  th.col-width-date=t(".created_at")
10
9
  - unless local_assigns.fetch(:exclude_type_column, false)
11
10
  th.col-width-large= t(".type")
@@ -0,0 +1,10 @@
1
+ = within_patient_layout(\
2
+ title: "Event / Edit",
3
+ breadcrumbs: breadcrumb_for("Events", patient_events_path(patient)) \
4
+ ) do
5
+
6
+ = render "renalware/events/events/form",
7
+ event: event,
8
+ patient: patient,
9
+ event_types: event_types,
10
+ url: patient_event_path(patient, event)
@@ -11,7 +11,7 @@
11
11
  wrapper: "horizontal_form" do |f|
12
12
 
13
13
  = render "form",
14
- event: event,
15
- patient: patient,
16
- event_types: event_types,
17
- f: f
14
+ event: event,
15
+ patient: patient,
16
+ event_types: event_types,
17
+ url: patient_events_path(patient)
@@ -1,13 +1,7 @@
1
1
  = within_patient_layout(title: "Investigations / Edit") do
2
2
 
3
- = simple_form_for event,
4
- url: patient_investigation_path(patient, event),
5
- as: :events_event,
6
- html: { autocomplete: "off" },
7
- wrapper: "horizontal_form" do |f|
8
-
9
- = render "renalware/events/events/form",
10
- event: event,
11
- patient: patient,
12
- event_types: event_types,
13
- f: f
3
+ = render "renalware/events/events/form",
4
+ event: event,
5
+ patient: patient,
6
+ event_types: event_types,
7
+ url: patient_investigation_path(patient, event)
@@ -3,14 +3,8 @@
3
3
  breadcrumbs: breadcrumb_for("Clinical Profile", patient_clinical_profile_path(patient))\
4
4
  ) do
5
5
 
6
- = simple_form_for event,
7
- url: patient_swab_path(patient, event),
8
- as: :events_event,
9
- html: { autocomplete: "off" },
10
- wrapper: "horizontal_form" do |f|
11
-
12
- = render "renalware/events/events/form",
13
- event: event,
14
- patient: patient,
15
- event_types: event_types,
16
- f: f
6
+ = render "renalware/events/events/form",
7
+ event: event,
8
+ patient: patient,
9
+ event_types: event_types,
10
+ url: patient_swab_path(patient, event)
@@ -1,13 +1,7 @@
1
1
  = within_patient_layout(title: "New Swab", breadcrumbs: clinical_profile_breadcrumb(patient)) do
2
2
 
3
- = simple_form_for event,
4
- url: patient_swabs_path(patient, event),
5
- as: :events_event,
6
- html: { autocomplete: "off" },
7
- wrapper: "horizontal_form" do |f|
8
-
9
- = render "renalware/events/events/form",
10
- event: event,
11
- patient: patient,
12
- event_types: event_types,
13
- f: f
3
+ = render "renalware/events/events/form",
4
+ event: event,
5
+ patient: patient,
6
+ event_types: event_types,
7
+ url: patient_swabs_path(patient, event)
@@ -14,9 +14,8 @@
14
14
  tbody
15
15
  - dialysers.each do |dialyser|
16
16
  tr
17
- td
17
+ td.actions
18
18
  = link_to "Edit", edit_hd_dialyser_path(dialyser.id)
19
- = pipe_separator
20
19
  = link_to "Delete",
21
20
  hd_dialyser_path(dialyser.id),
22
21
  method: :delete,
@@ -1,7 +1,6 @@
1
1
  tr
2
- td.noprint
2
+ td.noprint.actions
3
3
  = link_to "Sign-Off", edit_patient_hd_session_path(session.patient, session)
4
- = pipe_separator
5
4
  = link_to "HD Summary".html_safe, patient_hd_dashboard_path(session.patient)
6
5
  td.full-name
7
6
  = link_to session.patient.to_s, patient_clinical_summary_path(session.patient)
@@ -19,10 +19,9 @@
19
19
  tbody
20
20
  - hospital_units.each do |unit|
21
21
  tr
22
- td
22
+ td.actions
23
23
  - if policy(unit).edit?
24
24
  = link_to "Edit", edit_hospitals_unit_path(unit.id)
25
- = pipe_separator
26
25
  - if policy(unit).destroy?
27
26
  = link_to "Delete",
28
27
  hospitals_unit_path(unit.id),
@@ -8,9 +8,8 @@ table
8
8
  tbody
9
9
  - infection_organisms.each do |infection_organism|
10
10
  tr
11
- td
11
+ td.noprint.actions
12
12
  = link_to "Edit", edit_pd_infection_organism_path(infection_organism), remote: true
13
- = pipe_separator
14
13
  = link_to "Terminate", pd_infection_organism_path(infection_organism),
15
14
  method: :delete, remote: true, data: { confirm: "Are you sure?" }
16
15
  td= infection_organism
@@ -15,13 +15,12 @@
15
15
  - notes.each do |note|
16
16
  tr
17
17
  - unless problem.archived?
18
- td
18
+ td.actions
19
19
  - if policy(note).edit?
20
20
  = link_to "Edit",
21
21
  edit_patient_problem_note_path(problem.patient, problem, note),
22
22
  remote: true
23
23
  - if policy(note).destroy?
24
- = pipe_separator
25
24
  = link_to "Delete",
26
25
  patient_problem_note_path(problem.patient, problem, note),
27
26
  method: :delete,
@@ -9,9 +9,8 @@ table#current_problems.manual-stripes.auto-layout
9
9
  = content_tag(:tbody, class: "sortables", data: { rel: sort_patient_problems_path(@patient) }) do
10
10
  - problems.each do |problem|
11
11
  = content_tag_for(:tr, problem, class: "sortable") do
12
- td
12
+ td.actions
13
13
  = link_to "Edit", patient_problem_path(@patient, problem)
14
- = pipe_separator
15
14
  = link_to "Archive",
16
15
  patient_problem_path(@patient, problem),
17
16
  method: :delete,
@@ -22,13 +22,13 @@
22
22
  td= participant.patient.age
23
23
  td= participant.patient.sex
24
24
  td= participant.external_id
25
- td
25
+ td.actions
26
26
  = link_to "Delete",
27
27
  research_study_participant_path(study, participant),
28
28
  method: :delete,
29
29
  data: { confirm: "Are you sure?" }
30
- = " | "
31
30
  = link_to("Edit",
32
31
  edit_research_study_participant_path(study, participant),
33
32
  data: { "reveal-id" => "study-participant-modal", "reveal-ajax" => "true" })
33
+
34
34
  = paginate participants
@@ -20,10 +20,9 @@ article.status-history
20
20
  td= operation.nephrectomy_type.try(:text)
21
21
  - if operation.followup
22
22
  td= l operation.followup.last_seen_on
23
- td
23
+ td.actions.text-left
24
24
  = link_to "View",
25
25
  patient_transplants_donor_operation_followup_path(patient, operation)
26
- = pipe_separator
27
26
  = link_to "Update",
28
27
  edit_patient_transplants_donor_operation_followup_path(patient, operation)
29
28
  - else
@@ -38,15 +38,14 @@ article.recipient-operations
38
38
  - if operation.followup
39
39
  td= l operation.followup.transplant_failed_on
40
40
  td= operation.followup.transplant_failure_cause_description
41
- td
41
+ td.actions.text-left
42
42
  = link_to "View",
43
43
  patient_transplants_recipient_operation_followup_path(patient, operation)
44
- = pipe_separator
45
44
  = link_to "Update",
46
45
  edit_patient_transplants_recipient_operation_followup_path(patient, operation)
47
46
  - else
48
47
  td
49
48
  td
50
- td
49
+ td.actions.text-left
51
50
  - url = new_patient_transplants_recipient_operation_followup_path(patient, operation)
52
51
  = link_to "Enter details", url
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  resources :patients, only: [] do
4
- resources :events, only: [:new, :create, :index], controller: "events/events"
4
+ resources :events, except: :show, controller: "events/events"
5
5
  constraints(format: /(pdf)/) do
6
6
  resources :events, only: :show, controller: "events/events"
7
7
  end
@@ -5,6 +5,6 @@ module Renalware
5
5
  # to creat that class even though its not used. If we don't do this zeitwerk
6
6
  # complains that version.rb does export a constant called Version.
7
7
  class VersionNumber
8
- VERSION = "2.0.166"
8
+ VERSION = "2.0.167"
9
9
  end
10
10
  end
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.166
4
+ version: 2.0.167
5
5
  platform: ruby
6
6
  authors:
7
7
  - Airslie
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-21 00:00:00.000000000 Z
11
+ date: 2021-02-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord-import
@@ -742,14 +742,14 @@ dependencies:
742
742
  requirements:
743
743
  - - "~>"
744
744
  - !ruby/object:Gem::Version
745
- version: 2.3.0
745
+ version: 2.4.0
746
746
  type: :runtime
747
747
  prerelease: false
748
748
  version_requirements: !ruby/object:Gem::Requirement
749
749
  requirements:
750
750
  - - "~>"
751
751
  - !ruby/object:Gem::Version
752
- version: 2.3.0
752
+ version: 2.4.0
753
753
  - !ruby/object:Gem::Dependency
754
754
  name: record_tag_helper
755
755
  requirement: !ruby/object:Gem::Requirement
@@ -792,20 +792,6 @@ dependencies:
792
792
  - - "~>"
793
793
  - !ruby/object:Gem::Version
794
794
  version: 1.2.0
795
- - !ruby/object:Gem::Dependency
796
- name: rubyzip
797
- requirement: !ruby/object:Gem::Requirement
798
- requirements:
799
- - - "~>"
800
- - !ruby/object:Gem::Version
801
- version: 1.3.0
802
- type: :runtime
803
- prerelease: false
804
- version_requirements: !ruby/object:Gem::Requirement
805
- requirements:
806
- - - "~>"
807
- - !ruby/object:Gem::Version
808
- version: 1.3.0
809
795
  - !ruby/object:Gem::Dependency
810
796
  name: sassc-rails
811
797
  requirement: !ruby/object:Gem::Requirement
@@ -2588,6 +2574,7 @@ files:
2588
2574
  - app/views/renalware/events/events/cell/_investigation.html.slim
2589
2575
  - app/views/renalware/events/events/cell/_simple.html.slim
2590
2576
  - app/views/renalware/events/events/cell/_swab.html.slim
2577
+ - app/views/renalware/events/events/edit.html.slim
2591
2578
  - app/views/renalware/events/events/index.html.slim
2592
2579
  - app/views/renalware/events/events/inputs/_biopsy.html.slim
2593
2580
  - app/views/renalware/events/events/inputs/_investigation.html.slim