Merge branch 'master' of ssh://git.autonomic.zone:2222/autonomic-cooperative/opencase

This commit is contained in:
naomi 2022-05-07 13:56:55 +01:00
commit 7f5838aa84
30 changed files with 71 additions and 525 deletions

View File

@ -4,8 +4,6 @@ status: true
dependencies: dependencies:
config: config:
- field.field.oc_case.accommodation.field_case_finance - field.field.oc_case.accommodation.field_case_finance
- field.field.oc_case.accommodation.field_fee_calculation
- field.field.oc_case.accommodation.field_fee_or_equivalent_cost
- field.field.oc_case.accommodation.field_outcome - field.field.oc_case.accommodation.field_outcome
- field.field.oc_case.accommodation.field_type_of_acco - field.field.oc_case.accommodation.field_type_of_acco
- opencase_cases.oc_case_type.accommodation - opencase_cases.oc_case_type.accommodation
@ -23,19 +21,6 @@ content:
region: content region: content
settings: { } settings: { }
third_party_settings: { } third_party_settings: { }
field_fee_calculation:
type: options_select
weight: 6
region: content
settings: { }
third_party_settings: { }
field_fee_or_equivalent_cost:
type: number
weight: 5
region: content
settings:
placeholder: ''
third_party_settings: { }
field_outcome: field_outcome:
type: options_select type: options_select
weight: 7 weight: 7

View File

@ -4,13 +4,12 @@ status: true
dependencies: dependencies:
config: config:
- field.field.oc_case.asylum_support.field_case_finance - field.field.oc_case.asylum_support.field_case_finance
- field.field.oc_case.asylum_support.field_fee_calculation
- field.field.oc_case.asylum_support.field_fee_or_equivalent_cost
- field.field.oc_case.asylum_support.field_outcome - field.field.oc_case.asylum_support.field_outcome
- field.field.oc_case.asylum_support.field_type_of_as - field.field.oc_case.asylum_support.field_type_of_as
- opencase_cases.oc_case_type.asylum_support - opencase_cases.oc_case_type.asylum_support
module: module:
- file - file
- hide_revision_field
id: oc_case.asylum_support.default id: oc_case.asylum_support.default
targetEntityType: oc_case targetEntityType: oc_case
bundle: asylum_support bundle: asylum_support
@ -22,19 +21,6 @@ content:
region: content region: content
settings: { } settings: { }
third_party_settings: { } third_party_settings: { }
field_fee_calculation:
type: options_select
weight: 29
region: content
settings: { }
third_party_settings: { }
field_fee_or_equivalent_cost:
type: number
weight: 28
region: content
settings:
placeholder: ''
third_party_settings: { }
field_outcome: field_outcome:
type: options_select type: options_select
weight: 30 weight: 30
@ -67,7 +53,9 @@ content:
allow_user_settings: true allow_user_settings: true
third_party_settings: { } third_party_settings: { }
hidden: hidden:
name: true
notes: true notes: true
oc_target: true oc_target: true
status: true status: true
total_fee: true
user_id: true user_id: true

View File

@ -4,14 +4,13 @@ status: true
dependencies: dependencies:
config: config:
- field.field.oc_case.employability.field_case_finance - field.field.oc_case.employability.field_case_finance
- field.field.oc_case.employability.field_fee_calculation
- field.field.oc_case.employability.field_fee_or_equivalent_cost
- field.field.oc_case.employability.field_gave_list_of_agencies - field.field.oc_case.employability.field_gave_list_of_agencies
- field.field.oc_case.employability.field_outcome - field.field.oc_case.employability.field_outcome
- field.field.oc_case.employability.field_type_of_employability_help - field.field.oc_case.employability.field_type_of_employability_help
- opencase_cases.oc_case_type.employability - opencase_cases.oc_case_type.employability
module: module:
- file - file
- hide_revision_field
id: oc_case.employability.default id: oc_case.employability.default
targetEntityType: oc_case targetEntityType: oc_case
bundle: employability bundle: employability
@ -23,19 +22,6 @@ content:
region: content region: content
settings: { } settings: { }
third_party_settings: { } third_party_settings: { }
field_fee_calculation:
type: options_select
weight: 30
region: content
settings: { }
third_party_settings: { }
field_fee_or_equivalent_cost:
type: number
weight: 29
region: content
settings:
placeholder: ''
third_party_settings: { }
field_gave_list_of_agencies: field_gave_list_of_agencies:
type: boolean_checkbox type: boolean_checkbox
weight: 27 weight: 27
@ -75,7 +61,9 @@ content:
allow_user_settings: true allow_user_settings: true
third_party_settings: { } third_party_settings: { }
hidden: hidden:
name: true
notes: true notes: true
oc_target: true oc_target: true
status: true status: true
total_fee: true
user_id: true user_id: true

View File

@ -47,7 +47,9 @@ content:
allow_user_settings: true allow_user_settings: true
third_party_settings: { } third_party_settings: { }
hidden: hidden:
name: true
notes: true notes: true
oc_target: true oc_target: true
status: true status: true
total_fee: true
user_id: true user_id: true

View File

@ -4,13 +4,12 @@ status: true
dependencies: dependencies:
config: config:
- field.field.oc_case.health.field_case_finance - field.field.oc_case.health.field_case_finance
- field.field.oc_case.health.field_fee_calculation
- field.field.oc_case.health.field_fee_or_equivalent_cost
- field.field.oc_case.health.field_outcome - field.field.oc_case.health.field_outcome
- field.field.oc_case.health.field_type_health - field.field.oc_case.health.field_type_health
- opencase_cases.oc_case_type.health - opencase_cases.oc_case_type.health
module: module:
- file - file
- hide_revision_field
id: oc_case.health.default id: oc_case.health.default
targetEntityType: oc_case targetEntityType: oc_case
bundle: health bundle: health
@ -22,19 +21,6 @@ content:
region: content region: content
settings: { } settings: { }
third_party_settings: { } third_party_settings: { }
field_fee_calculation:
type: options_select
weight: 29
region: content
settings: { }
third_party_settings: { }
field_fee_or_equivalent_cost:
type: number
weight: 28
region: content
settings:
placeholder: ''
third_party_settings: { }
field_outcome: field_outcome:
type: options_select type: options_select
weight: 30 weight: 30
@ -67,7 +53,9 @@ content:
allow_user_settings: true allow_user_settings: true
third_party_settings: { } third_party_settings: { }
hidden: hidden:
name: true
notes: true notes: true
oc_target: true oc_target: true
status: true status: true
total_fee: true
user_id: true user_id: true

View File

@ -4,14 +4,13 @@ status: true
dependencies: dependencies:
config: config:
- field.field.oc_case.immigration.field_case_finance - field.field.oc_case.immigration.field_case_finance
- field.field.oc_case.immigration.field_fee_calculation
- field.field.oc_case.immigration.field_fee_or_equivalent_cost
- field.field.oc_case.immigration.field_level - field.field.oc_case.immigration.field_level
- field.field.oc_case.immigration.field_outcome - field.field.oc_case.immigration.field_outcome
- field.field.oc_case.immigration.field_type_of_applicat - field.field.oc_case.immigration.field_type_of_applicat
- opencase_cases.oc_case_type.immigration - opencase_cases.oc_case_type.immigration
module: module:
- file - file
- hide_revision_field
id: oc_case.immigration.default id: oc_case.immigration.default
targetEntityType: oc_case targetEntityType: oc_case
bundle: immigration bundle: immigration
@ -23,19 +22,6 @@ content:
region: content region: content
settings: { } settings: { }
third_party_settings: { } third_party_settings: { }
field_fee_calculation:
type: options_select
weight: 30
region: content
settings: { }
third_party_settings: { }
field_fee_or_equivalent_cost:
type: number
weight: 29
region: content
settings:
placeholder: ''
third_party_settings: { }
field_level: field_level:
type: options_select type: options_select
weight: 26 weight: 26
@ -74,7 +60,9 @@ content:
allow_user_settings: true allow_user_settings: true
third_party_settings: { } third_party_settings: { }
hidden: hidden:
name: true
notes: true notes: true
oc_target: true oc_target: true
status: true status: true
total_fee: true
user_id: true user_id: true

View File

@ -38,7 +38,9 @@ content:
allow_user_settings: true allow_user_settings: true
third_party_settings: { } third_party_settings: { }
hidden: hidden:
name: true
notes: true notes: true
oc_target: true oc_target: true
status: true status: true
total_fee: true
user_id: true user_id: true

View File

@ -4,13 +4,12 @@ status: true
dependencies: dependencies:
config: config:
- field.field.oc_case.welfare_rights.field_case_finance - field.field.oc_case.welfare_rights.field_case_finance
- field.field.oc_case.welfare_rights.field_fee_calculation
- field.field.oc_case.welfare_rights.field_fee_or_equivalent_cost
- field.field.oc_case.welfare_rights.field_outcome - field.field.oc_case.welfare_rights.field_outcome
- field.field.oc_case.welfare_rights.field_type_of_welfare_rights_iss - field.field.oc_case.welfare_rights.field_type_of_welfare_rights_iss
- opencase_cases.oc_case_type.welfare_rights - opencase_cases.oc_case_type.welfare_rights
module: module:
- file - file
- hide_revision_field
id: oc_case.welfare_rights.default id: oc_case.welfare_rights.default
targetEntityType: oc_case targetEntityType: oc_case
bundle: welfare_rights bundle: welfare_rights
@ -22,19 +21,6 @@ content:
region: content region: content
settings: { } settings: { }
third_party_settings: { } third_party_settings: { }
field_fee_calculation:
type: options_select
weight: 29
region: content
settings: { }
third_party_settings: { }
field_fee_or_equivalent_cost:
type: number
weight: 28
region: content
settings:
placeholder: ''
third_party_settings: { }
field_outcome: field_outcome:
type: options_select type: options_select
weight: 30 weight: 30
@ -67,7 +53,9 @@ content:
allow_user_settings: true allow_user_settings: true
third_party_settings: { } third_party_settings: { }
hidden: hidden:
name: true
notes: true notes: true
oc_target: true oc_target: true
status: true status: true
total_fee: true
user_id: true user_id: true

View File

@ -4,8 +4,6 @@ status: true
dependencies: dependencies:
config: config:
- field.field.oc_case.accommodation.field_case_finance - field.field.oc_case.accommodation.field_case_finance
- field.field.oc_case.accommodation.field_fee_calculation
- field.field.oc_case.accommodation.field_fee_or_equivalent_cost
- field.field.oc_case.accommodation.field_outcome - field.field.oc_case.accommodation.field_outcome
- field.field.oc_case.accommodation.field_type_of_acco - field.field.oc_case.accommodation.field_type_of_acco
- opencase_cases.oc_case_type.accommodation - opencase_cases.oc_case_type.accommodation
@ -76,8 +74,6 @@ content:
hidden: hidden:
changed: true changed: true
created: true created: true
field_fee_calculation: true
field_fee_or_equivalent_cost: true
name: true name: true
notes: true notes: true
search_api_excerpt: true search_api_excerpt: true

View File

@ -4,8 +4,6 @@ status: true
dependencies: dependencies:
config: config:
- field.field.oc_case.asylum_support.field_case_finance - field.field.oc_case.asylum_support.field_case_finance
- field.field.oc_case.asylum_support.field_fee_calculation
- field.field.oc_case.asylum_support.field_fee_or_equivalent_cost
- field.field.oc_case.asylum_support.field_outcome - field.field.oc_case.asylum_support.field_outcome
- field.field.oc_case.asylum_support.field_type_of_as - field.field.oc_case.asylum_support.field_type_of_as
- opencase_cases.oc_case_type.asylum_support - opencase_cases.oc_case_type.asylum_support
@ -25,24 +23,6 @@ content:
third_party_settings: { } third_party_settings: { }
weight: 1 weight: 1
region: content region: content
field_fee_calculation:
type: list_default
label: above
settings: { }
third_party_settings: { }
weight: 3
region: content
field_fee_or_equivalent_cost:
type: number_decimal
label: above
settings:
thousand_separator: ''
decimal_separator: .
scale: 2
prefix_suffix: true
third_party_settings: { }
weight: 2
region: content
field_outcome: field_outcome:
type: list_default type: list_default
label: above label: above
@ -75,6 +55,9 @@ content:
hidden: hidden:
changed: true changed: true
created: true created: true
name: true
notes: true notes: true
oc_target: true
search_api_excerpt: true search_api_excerpt: true
status: true
total_fee: true total_fee: true

View File

@ -4,8 +4,6 @@ status: true
dependencies: dependencies:
config: config:
- field.field.oc_case.employability.field_case_finance - field.field.oc_case.employability.field_case_finance
- field.field.oc_case.employability.field_fee_calculation
- field.field.oc_case.employability.field_fee_or_equivalent_cost
- field.field.oc_case.employability.field_gave_list_of_agencies - field.field.oc_case.employability.field_gave_list_of_agencies
- field.field.oc_case.employability.field_outcome - field.field.oc_case.employability.field_outcome
- field.field.oc_case.employability.field_type_of_employability_help - field.field.oc_case.employability.field_type_of_employability_help
@ -26,24 +24,6 @@ content:
third_party_settings: { } third_party_settings: { }
weight: 2 weight: 2
region: content region: content
field_fee_calculation:
type: list_default
label: above
settings: { }
third_party_settings: { }
weight: 4
region: content
field_fee_or_equivalent_cost:
type: number_decimal
label: above
settings:
thousand_separator: ''
decimal_separator: .
scale: 2
prefix_suffix: true
third_party_settings: { }
weight: 3
region: content
field_gave_list_of_agencies: field_gave_list_of_agencies:
type: boolean type: boolean
label: above label: above
@ -86,6 +66,9 @@ content:
hidden: hidden:
changed: true changed: true
created: true created: true
name: true
notes: true notes: true
oc_target: true
search_api_excerpt: true search_api_excerpt: true
status: true
total_fee: true total_fee: true

View File

@ -4,8 +4,6 @@ status: true
dependencies: dependencies:
config: config:
- field.field.oc_case.health.field_case_finance - field.field.oc_case.health.field_case_finance
- field.field.oc_case.health.field_fee_calculation
- field.field.oc_case.health.field_fee_or_equivalent_cost
- field.field.oc_case.health.field_outcome - field.field.oc_case.health.field_outcome
- field.field.oc_case.health.field_type_health - field.field.oc_case.health.field_type_health
- opencase_cases.oc_case_type.health - opencase_cases.oc_case_type.health
@ -25,24 +23,6 @@ content:
third_party_settings: { } third_party_settings: { }
weight: 1 weight: 1
region: content region: content
field_fee_calculation:
type: list_default
label: above
settings: { }
third_party_settings: { }
weight: 3
region: content
field_fee_or_equivalent_cost:
type: number_decimal
label: above
settings:
thousand_separator: ''
decimal_separator: .
scale: 2
prefix_suffix: true
third_party_settings: { }
weight: 2
region: content
field_outcome: field_outcome:
type: list_default type: list_default
label: above label: above
@ -75,6 +55,9 @@ content:
hidden: hidden:
changed: true changed: true
created: true created: true
name: true
notes: true notes: true
oc_target: true
search_api_excerpt: true search_api_excerpt: true
status: true
total_fee: true total_fee: true

View File

@ -4,8 +4,6 @@ status: true
dependencies: dependencies:
config: config:
- field.field.oc_case.immigration.field_case_finance - field.field.oc_case.immigration.field_case_finance
- field.field.oc_case.immigration.field_fee_calculation
- field.field.oc_case.immigration.field_fee_or_equivalent_cost
- field.field.oc_case.immigration.field_level - field.field.oc_case.immigration.field_level
- field.field.oc_case.immigration.field_outcome - field.field.oc_case.immigration.field_outcome
- field.field.oc_case.immigration.field_type_of_applicat - field.field.oc_case.immigration.field_type_of_applicat
@ -26,24 +24,6 @@ content:
third_party_settings: { } third_party_settings: { }
weight: 2 weight: 2
region: content region: content
field_fee_calculation:
type: list_default
label: above
settings: { }
third_party_settings: { }
weight: 4
region: content
field_fee_or_equivalent_cost:
type: number_decimal
label: above
settings:
thousand_separator: ''
decimal_separator: .
scale: 2
prefix_suffix: true
third_party_settings: { }
weight: 3
region: content
field_level: field_level:
type: list_default type: list_default
label: above label: above
@ -83,6 +63,9 @@ content:
hidden: hidden:
changed: true changed: true
created: true created: true
name: true
notes: true notes: true
oc_target: true
search_api_excerpt: true search_api_excerpt: true
status: true
total_fee: true total_fee: true

View File

@ -4,8 +4,6 @@ status: true
dependencies: dependencies:
config: config:
- field.field.oc_case.welfare_rights.field_case_finance - field.field.oc_case.welfare_rights.field_case_finance
- field.field.oc_case.welfare_rights.field_fee_calculation
- field.field.oc_case.welfare_rights.field_fee_or_equivalent_cost
- field.field.oc_case.welfare_rights.field_outcome - field.field.oc_case.welfare_rights.field_outcome
- field.field.oc_case.welfare_rights.field_type_of_welfare_rights_iss - field.field.oc_case.welfare_rights.field_type_of_welfare_rights_iss
- opencase_cases.oc_case_type.welfare_rights - opencase_cases.oc_case_type.welfare_rights
@ -25,24 +23,6 @@ content:
third_party_settings: { } third_party_settings: { }
weight: 1 weight: 1
region: content region: content
field_fee_calculation:
type: list_default
label: above
settings: { }
third_party_settings: { }
weight: 3
region: content
field_fee_or_equivalent_cost:
type: number_decimal
label: above
settings:
thousand_separator: ''
decimal_separator: .
scale: 2
prefix_suffix: true
third_party_settings: { }
weight: 2
region: content
field_outcome: field_outcome:
type: list_default type: list_default
label: above label: above
@ -75,6 +55,9 @@ content:
hidden: hidden:
changed: true changed: true
created: true created: true
name: true
notes: true notes: true
oc_target: true
search_api_excerpt: true search_api_excerpt: true
status: true
total_fee: true total_fee: true

View File

@ -1,21 +0,0 @@
uuid: 96f7ac9c-5cbc-44f3-b414-16f1013de805
langcode: en
status: true
dependencies:
config:
- field.storage.oc_case.field_fee_calculation
- opencase_cases.oc_case_type.accommodation
module:
- options
id: oc_case.accommodation.field_fee_calculation
field_name: field_fee_calculation
entity_type: oc_case
bundle: accommodation
label: 'Fee calculation'
description: 'If it is per hour, it will be calculated according to the sum of time spent on all the activities logged on the case.'
required: false
translatable: false
default_value: { }
default_value_callback: ''
settings: { }
field_type: list_string

View File

@ -1,23 +0,0 @@
uuid: f02e6290-9a20-4f32-b56b-1ca92d116e08
langcode: en
status: true
dependencies:
config:
- field.storage.oc_case.field_fee_or_equivalent_cost
- opencase_cases.oc_case_type.accommodation
id: oc_case.accommodation.field_fee_or_equivalent_cost
field_name: field_fee_or_equivalent_cost
entity_type: oc_case
bundle: accommodation
label: 'Fee or equivalent cost'
description: 'If the case is pro bono, state what it would have cost if it were fee paying.'
required: false
translatable: false
default_value: { }
default_value_callback: ''
settings:
min: null
max: null
prefix: £
suffix: ''
field_type: decimal

View File

@ -1,21 +0,0 @@
uuid: 3e387db9-252d-4ee4-af7a-3fc98016c231
langcode: en
status: true
dependencies:
config:
- field.storage.oc_case.field_fee_calculation
- opencase_cases.oc_case_type.asylum_support
module:
- options
id: oc_case.asylum_support.field_fee_calculation
field_name: field_fee_calculation
entity_type: oc_case
bundle: asylum_support
label: 'Fee calculation'
description: 'If it is per hour, it will be calculated according to the sum of time spent on all the activities logged on the case.'
required: false
translatable: true
default_value: { }
default_value_callback: ''
settings: { }
field_type: list_string

View File

@ -1,23 +0,0 @@
uuid: 0377978c-7e7f-4bfd-a55c-7fccf992022d
langcode: en
status: true
dependencies:
config:
- field.storage.oc_case.field_fee_or_equivalent_cost
- opencase_cases.oc_case_type.asylum_support
id: oc_case.asylum_support.field_fee_or_equivalent_cost
field_name: field_fee_or_equivalent_cost
entity_type: oc_case
bundle: asylum_support
label: 'Fee or equivalent cost'
description: ''
required: false
translatable: true
default_value: { }
default_value_callback: ''
settings:
min: null
max: null
prefix: £
suffix: ''
field_type: decimal

View File

@ -1,21 +0,0 @@
uuid: 7cd8962e-ce35-4d4d-807b-92e202f3e011
langcode: en
status: true
dependencies:
config:
- field.storage.oc_case.field_fee_calculation
- opencase_cases.oc_case_type.employability
module:
- options
id: oc_case.employability.field_fee_calculation
field_name: field_fee_calculation
entity_type: oc_case
bundle: employability
label: 'Fee calculation'
description: 'If it is per hour, it will be calculated according to the sum of time spent on all the activities logged on the case.'
required: false
translatable: true
default_value: { }
default_value_callback: ''
settings: { }
field_type: list_string

View File

@ -1,23 +0,0 @@
uuid: aa3063fb-4d0f-4ebd-9293-fbd1d52fe33c
langcode: en
status: true
dependencies:
config:
- field.storage.oc_case.field_fee_or_equivalent_cost
- opencase_cases.oc_case_type.employability
id: oc_case.employability.field_fee_or_equivalent_cost
field_name: field_fee_or_equivalent_cost
entity_type: oc_case
bundle: employability
label: 'Fee or equivalent cost'
description: 'If the case is pro bono, state what it would have cost if it were fee paying.'
required: false
translatable: true
default_value: { }
default_value_callback: ''
settings:
min: null
max: null
prefix: £
suffix: ''
field_type: decimal

View File

@ -1,21 +0,0 @@
uuid: 366fddf9-2fc2-4559-af49-bb1bedb0fd32
langcode: en
status: true
dependencies:
config:
- field.storage.oc_case.field_fee_calculation
- opencase_cases.oc_case_type.health
module:
- options
id: oc_case.health.field_fee_calculation
field_name: field_fee_calculation
entity_type: oc_case
bundle: health
label: 'Fee calculation'
description: 'If it is per hour, it will be calculated according to the sum of time spent on all the activities logged on the case.'
required: false
translatable: true
default_value: { }
default_value_callback: ''
settings: { }
field_type: list_string

View File

@ -1,23 +0,0 @@
uuid: 9d1c9cf8-5e49-4fa4-b81a-d3a5dd7d9698
langcode: en
status: true
dependencies:
config:
- field.storage.oc_case.field_fee_or_equivalent_cost
- opencase_cases.oc_case_type.health
id: oc_case.health.field_fee_or_equivalent_cost
field_name: field_fee_or_equivalent_cost
entity_type: oc_case
bundle: health
label: 'Fee or equivalent cost'
description: 'If the case is pro bono, state what it would have cost if it were fee paying.'
required: false
translatable: true
default_value: { }
default_value_callback: ''
settings:
min: null
max: null
prefix: £
suffix: ''
field_type: decimal

View File

@ -1,21 +0,0 @@
uuid: 87c8d4f1-963a-4150-952f-676ce09137a7
langcode: en
status: true
dependencies:
config:
- field.storage.oc_case.field_fee_calculation
- opencase_cases.oc_case_type.immigration
module:
- options
id: oc_case.immigration.field_fee_calculation
field_name: field_fee_calculation
entity_type: oc_case
bundle: immigration
label: 'Fee calculation'
description: 'If it is per hour, it will be calculated according to the sum of time spent on all the activities logged on the case.'
required: false
translatable: true
default_value: { }
default_value_callback: ''
settings: { }
field_type: list_string

View File

@ -1,23 +0,0 @@
uuid: 4e82ad9f-4e8a-439d-8bbd-17e497bd9e01
langcode: en
status: true
dependencies:
config:
- field.storage.oc_case.field_fee_or_equivalent_cost
- opencase_cases.oc_case_type.immigration
id: oc_case.immigration.field_fee_or_equivalent_cost
field_name: field_fee_or_equivalent_cost
entity_type: oc_case
bundle: immigration
label: 'Fee or equivalent cost'
description: 'If the case is pro bono, state what it would have cost if it were fee paying.'
required: false
translatable: true
default_value: { }
default_value_callback: ''
settings:
min: null
max: null
prefix: £
suffix: ''
field_type: decimal

View File

@ -1,21 +0,0 @@
uuid: f5a43306-3564-47ea-8b0d-fa8c9e18c16d
langcode: en
status: true
dependencies:
config:
- field.storage.oc_case.field_fee_calculation
- opencase_cases.oc_case_type.welfare_rights
module:
- options
id: oc_case.welfare_rights.field_fee_calculation
field_name: field_fee_calculation
entity_type: oc_case
bundle: welfare_rights
label: 'Fee calculation'
description: 'If it is per hour, it will be calculated according to the sum of time spent on all the activities logged on the case.'
required: false
translatable: true
default_value: { }
default_value_callback: ''
settings: { }
field_type: list_string

View File

@ -1,23 +0,0 @@
uuid: f38fe7ef-bb7c-41af-8dbe-23ba8d8b199c
langcode: en
status: true
dependencies:
config:
- field.storage.oc_case.field_fee_or_equivalent_cost
- opencase_cases.oc_case_type.welfare_rights
id: oc_case.welfare_rights.field_fee_or_equivalent_cost
field_name: field_fee_or_equivalent_cost
entity_type: oc_case
bundle: welfare_rights
label: 'Fee or equivalent cost'
description: 'If the case is pro bono, state what it would have cost if it were fee paying.'
required: false
translatable: true
default_value: { }
default_value_callback: ''
settings:
min: null
max: null
prefix: £
suffix: ''
field_type: decimal

View File

@ -1,27 +0,0 @@
uuid: aaf7cf91-c015-4468-9166-849311753ef1
langcode: en
status: true
dependencies:
module:
- opencase_entities
- options
id: oc_case.field_fee_calculation
field_name: field_fee_calculation
entity_type: oc_case
type: list_string
settings:
allowed_values:
-
value: 'Complete case'
label: 'Complete case'
-
value: 'Per hour'
label: 'Per hour'
allowed_values_function: ''
module: options
locked: false
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false

View File

@ -1,20 +0,0 @@
uuid: 35a6a6f4-9dbe-40ed-9a56-927ffda26e15
langcode: en
status: true
dependencies:
module:
- opencase_entities
id: oc_case.field_fee_or_equivalent_cost
field_name: field_fee_or_equivalent_cost
entity_type: oc_case
type: decimal
settings:
precision: 10
scale: 2
module: core
locked: false
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false

View File

@ -1,20 +0,0 @@
uuid: 82123195-ae6e-4d7a-9755-df73244e110d
langcode: en
status: true
dependencies: { }
id: caseworker
label: Caseworker
weight: 5
is_admin: null
permissions:
- 'add activity entities'
- 'add case entities'
- 'add client entities'
- 'delete activity entities'
- 'delete case entities'
- 'delete client entities'
- 'edit activity entities'
- 'edit case entities'
- 'edit client entities'
- 'view own cases'
- 'view published client entities'

View File

@ -0,0 +1,37 @@
<?php declare(strict_types = 1);
namespace Drupal\opencase;
use Drupal;
final class TimeBasedFieldUpdater {
private string $date_field;
private string $entity_type;
private array $conditions;
private string $date_format;
final public function __construct($entity_type, $date_field, $conditions = [], $date_format = 'Y-m-d')
{
$this->date_field = $date_field;
$this->conditions = $conditions;
$this->date_format = $date_format;
$this->entity_type = $entity_type;
}
final public function update($time_elapsed, $old_values, $new_values): void {
$query = Drupal::entityQuery($this->entity_type);
foreach($this->conditions as $cond_field=>$cond_value) {
$query->condition($cond_field, $cond_value);
}
foreach($old_values as $old_field=>$old_value) {
$query->condition($old_field, $old_value);
}
$query->condition($this->date_field, date($this->date_format, strtotime('-'.$time_elapsed)), "<");
foreach($query->execute() as $id) {
$entity = Drupal::entityTypeManager()->getStorage($this->entity_type)->load($id);
foreach($new_values as $new_field=>$new_value) {
$entity->set($new_field, $new_value);
}
$entity->save();
}
}
}