Added a sample report with csv download

This commit is contained in:
naomi 2022-04-21 13:36:18 +01:00
parent f75f03bc9c
commit 35176a00bf
16 changed files with 2418 additions and 1968 deletions

View File

@ -44,13 +44,14 @@
"drupal/typed_data": "^1.0@alpha",
"drupal/views_aggregator": "^2.0",
"drupal/views_autosubmit": "^1.4",
"drupal/views_data_export": "^1.1",
"drupal/views_summarize": "1.1.x-dev",
"drush/drush": "*"
"drush/drush": "*",
"phpunit/phpunit": "^9.5"
},
"require-dev": {
"drupal/console": "^1.9",
"drupal/devel": "^4.1",
"phpunit/phpunit": "^9.5"
"drupal/devel": "^4.1"
},
"conflict": {
"drupal/drupal": "*"

4009
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -11,6 +11,7 @@ dependencies:
- opencase_cases.oc_case_type.accommodation
module:
- file
- hide_revision_field
id: oc_case.accommodation.default
targetEntityType: oc_case
bundle: accommodation
@ -66,7 +67,7 @@ content:
third_party_settings: { }
revision_log:
type: hide_revision_field_log_widget
weight: 80
weight: 7
region: content
settings:
rows: 5
@ -77,6 +78,8 @@ content:
allow_user_settings: true
third_party_settings: { }
hidden:
name: true
notes: true
status: true
total_fee: true
user_id: true

View File

@ -68,5 +68,6 @@ content:
third_party_settings: { }
hidden:
notes: true
oc_target: true
status: true
user_id: true

View File

@ -76,5 +76,6 @@ content:
third_party_settings: { }
hidden:
notes: true
oc_target: true
status: true
user_id: true

View File

@ -48,5 +48,6 @@ content:
third_party_settings: { }
hidden:
notes: true
oc_target: true
status: true
user_id: true

View File

@ -68,5 +68,6 @@ content:
third_party_settings: { }
hidden:
notes: true
oc_target: true
status: true
user_id: true

View File

@ -75,5 +75,6 @@ content:
third_party_settings: { }
hidden:
notes: true
oc_target: true
status: true
user_id: true

View File

@ -39,5 +39,6 @@ content:
third_party_settings: { }
hidden:
notes: true
oc_target: true
status: true
user_id: true

View File

@ -68,5 +68,6 @@ content:
third_party_settings: { }
hidden:
notes: true
oc_target: true
status: true
user_id: true

View File

@ -9,39 +9,16 @@ targetEntityType: oc_case_fee
bundle: fee
mode: default
content:
name:
type: string_textfield
weight: 0
amount:
type: number
weight: 1
region: content
settings:
size: 60
placeholder: ''
third_party_settings: { }
oc_case:
type: entity_reference_autocomplete
weight: 1
region: content
settings:
match_operator: CONTAINS
match_limit: 10
size: 60
placeholder: ''
third_party_settings: { }
revision_log:
type: hide_revision_field_log_widget
weight: 80
region: content
settings:
rows: 5
placeholder: ''
show: true
default: ''
permission_based: false
allow_user_settings: true
third_party_settings: { }
user_id:
type: entity_reference_autocomplete
weight: 2
weight: 0
region: content
settings:
match_operator: CONTAINS
@ -50,6 +27,8 @@ content:
placeholder: ''
third_party_settings: { }
hidden:
amount: true
name: true
oc_fee_category: true
revision_log: true
status: true
user_id: true

View File

@ -25,30 +25,12 @@ content:
third_party_settings: { }
weight: 2
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_outcome:
type: list_default
label: above
settings: { }
third_party_settings: { }
weight: 5
weight: 4
region: content
field_type_of_acco:
type: list_default
@ -63,7 +45,7 @@ content:
settings:
use_description_as_link_text: true
third_party_settings: { }
weight: 7
weight: 6
region: content
oc_target:
type: entity_reference_label
@ -73,16 +55,30 @@ content:
third_party_settings: { }
weight: 0
region: content
total_fee:
type: number_decimal
label: above
settings:
thousand_separator: ''
decimal_separator: .
scale: 2
prefix_suffix: true
third_party_settings: { }
weight: 3
region: content
user_id:
type: author
label: above
settings: { }
third_party_settings: { }
weight: 6
weight: 5
region: content
hidden:
changed: true
created: true
field_fee_calculation: true
field_fee_or_equivalent_cost: true
name: true
notes: true
search_api_excerpt: true
total_fee: true
status: true

View File

@ -4,30 +4,33 @@ status: true
dependencies:
config:
- opencase_cases.oc_case_fee_type.fee
module:
- user
id: oc_case_fee.fee.default
targetEntityType: oc_case_fee
bundle: fee
mode: default
content:
name:
type: string
label: hidden
amount:
type: number_decimal
label: above
settings:
link_to_entity: false
thousand_separator: ''
decimal_separator: .
scale: 2
prefix_suffix: true
third_party_settings: { }
weight: 1
region: content
user_id:
type: author
oc_case:
type: entity_reference_label
label: above
settings: { }
settings:
link: true
third_party_settings: { }
weight: 2
weight: 0
region: content
hidden:
amount: true
name: true
oc_fee_category: true
search_api_excerpt: true
status: true
user_id: true

View File

@ -36,5 +36,6 @@ content:
region: content
hidden:
name: true
oc_case: true
search_api_excerpt: true
status: true

View File

@ -15,6 +15,7 @@ module:
config: 0
contact: 0
contextual: 0
csv_serialization: 0
ctools: 0
ctools_entity_mask: 0
date_popup: 0
@ -79,6 +80,7 @@ module:
views_aggregator: 0
views_aggregator_more_functions: 0
views_autosubmit: 0
views_data_export: 0
views_summarize: 0
views_ui: 0
hide_revision_field: 1

View File

@ -0,0 +1,255 @@
uuid: 0c812021-ff90-442b-a7a0-353d538d6e15
langcode: en
status: true
dependencies:
module:
- csv_serialization
- opencase_entities
- rest
- serialization
- views_data_export
id: sample_downloadable_report
label: 'Sample Downloadable Report'
module: views
description: ''
tag: ''
base_table: oc_actor_field_data
base_field: id
display:
default:
id: default
display_title: Default
display_plugin: default
position: 0
display_options:
title: 'Sample Downloadable Report'
fields:
name:
id: name
table: oc_actor_field_data
field: name
relationship: none
group_type: group
admin_label: ''
entity_type: null
entity_field: name
plugin_id: field
label: Name
exclude: false
alter:
alter_text: false
text: ''
make_link: false
path: ''
absolute: false
external: false
replace_spaces: false
path_case: none
trim_whitespace: false
alt: ''
rel: ''
link_class: ''
prefix: ''
suffix: ''
target: ''
nl2br: false
max_length: 0
word_boundary: true
ellipsis: true
more_link: false
more_link_text: ''
more_link_path: ''
strip_tags: false
trim: false
preserve_tags: ''
html: false
element_type: ''
element_class: ''
element_label_type: ''
element_label_class: ''
element_label_colon: true
element_wrapper_type: ''
element_wrapper_class: ''
element_default_classes: true
empty: ''
hide_empty: false
empty_zero: false
hide_alter_empty: true
click_sort_column: value
type: string
settings: { }
group_column: value
group_columns: { }
group_rows: true
delta_limit: 0
delta_offset: 0
delta_reversed: false
delta_first_last: false
multi_type: separator
separator: ', '
field_api_classes: false
pager:
type: mini
options:
offset: 0
items_per_page: 10
total_pages: null
id: 0
tags:
next:
previous:
expose:
items_per_page: false
items_per_page_label: 'Items per page'
items_per_page_options: '5, 10, 25, 50'
items_per_page_options_all: false
items_per_page_options_all_label: '- All -'
offset: false
offset_label: Offset
exposed_form:
type: basic
options:
submit_button: Apply
reset_button: false
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
expose_sort_order: true
sort_asc_label: Asc
sort_desc_label: Desc
access:
type: none
options: { }
cache:
type: tag
options: { }
empty: { }
sorts: { }
arguments: { }
filters:
first_name:
id: first_name
table: oc_actor_field_data
field: first_name
relationship: none
group_type: group
admin_label: ''
entity_type: oc_actor
entity_field: first_name
plugin_id: string
operator: starts
value: ''
group: 1
exposed: true
expose:
operator_id: first_name_op
label: 'First Name'
description: ''
use_operator: false
operator: first_name_op
operator_limit_selection: false
operator_list: { }
identifier: first_name
required: false
remember: false
multiple: false
remember_roles:
authenticated: authenticated
anonymous: '0'
content_editor: '0'
administrator: '0'
overseer: '0'
caseworker: '0'
volunteer_co_ord: '0'
opencase_admin: '0'
placeholder: ''
is_grouped: false
group_info:
label: ''
description: ''
identifier: ''
optional: true
widget: select
multiple: false
remember: false
default_group: All
default_group_multiple: { }
group_items: { }
style:
type: table
row:
type: fields
query:
type: views_query
options:
query_comment: ''
disable_sql_rewrite: false
distinct: false
replica: false
query_tags: { }
relationships: { }
header: { }
footer: { }
display_extenders: { }
cache_metadata:
max-age: -1
contexts:
- 'languages:language_content'
- 'languages:language_interface'
- url
- url.query_args
tags: { }
data_export_1:
id: data_export_1
display_title: 'Data export'
display_plugin: data_export
position: 2
display_options:
style:
type: data_export
options:
formats:
csv: csv
csv_settings:
delimiter: ','
enclosure: '"'
escape_char: \
strip_tags: true
trim: true
encoding: utf8
utf8_bom: '0'
use_serializer_encode_only: false
display_extenders: { }
path: sample-downloadable-report/download
displays:
page_1: page_1
default: '0'
filename: ''
automatic_download: false
store_in_public_file_directory: null
custom_redirect_path: false
redirect_to_display: none
include_query_params: false
cache_metadata:
max-age: -1
contexts:
- 'languages:language_content'
- 'languages:language_interface'
- request_format
- url
tags: { }
page_1:
id: page_1
display_title: Page
display_plugin: page
position: 1
display_options:
display_extenders: { }
path: sample-downloadable-report
cache_metadata:
max-age: -1
contexts:
- 'languages:language_content'
- 'languages:language_interface'
- url
- url.query_args
tags: { }