diff options
Diffstat (limited to 'app/views/v1/shared')
| -rw-r--r-- | app/views/v1/shared/_company.jbuilder | 4 | ||||
| -rw-r--r-- | app/views/v1/shared/_confidential_company.jbuilder | 4 | ||||
| -rw-r--r-- | app/views/v1/shared/_confidential_well_type.jbuilder | 5 | ||||
| -rw-r--r-- | app/views/v1/shared/_license.jbuilder | 12 | ||||
| -rw-r--r-- | app/views/v1/shared/_location.jbuilder | 5 | ||||
| -rw-r--r-- | app/views/v1/shared/_well_type.jbuilder | 5 |
6 files changed, 35 insertions, 0 deletions
diff --git a/app/views/v1/shared/_company.jbuilder b/app/views/v1/shared/_company.jbuilder new file mode 100644 index 0000000..91a79da --- /dev/null +++ b/app/views/v1/shared/_company.jbuilder @@ -0,0 +1,4 @@ +json.company do + json.name company.name + json.applicant_name applicant.full_name +end diff --git a/app/views/v1/shared/_confidential_company.jbuilder b/app/views/v1/shared/_confidential_company.jbuilder new file mode 100644 index 0000000..312961a --- /dev/null +++ b/app/views/v1/shared/_confidential_company.jbuilder @@ -0,0 +1,4 @@ +json.company do + json.name "CONFIDENTIAL" + json.applicant_name "CONFIDENTIAL" +end diff --git a/app/views/v1/shared/_confidential_well_type.jbuilder b/app/views/v1/shared/_confidential_well_type.jbuilder new file mode 100644 index 0000000..43d8f39 --- /dev/null +++ b/app/views/v1/shared/_confidential_well_type.jbuilder @@ -0,0 +1,5 @@ +json.well_type do + json.id "" + json.acronym "" + json.name "CONFIDENTIAL" +end diff --git a/app/views/v1/shared/_license.jbuilder b/app/views/v1/shared/_license.jbuilder new file mode 100644 index 0000000..066ed8b --- /dev/null +++ b/app/views/v1/shared/_license.jbuilder @@ -0,0 +1,12 @@ +json.id license.id +json.status license.status.to_s +json.partial! 'v1/shared/location', location: license.location +if license.confidential? + json.partial! 'v1/shared/confidential_well_type', well_type: license.well_type + json.partial! 'v1/shared/confidential_company' +else + json.partial! 'v1/shared/well_type', well_type: license.well_type + json.partial! 'v1/shared/company', company: license.company, applicant: license.applicant +end +json.issued_at license.issued_at.to_s +json.expired_at license.expired_at.to_s diff --git a/app/views/v1/shared/_location.jbuilder b/app/views/v1/shared/_location.jbuilder new file mode 100644 index 0000000..5b43756 --- /dev/null +++ b/app/views/v1/shared/_location.jbuilder @@ -0,0 +1,5 @@ +json.location do + json.township location.township + json.latitude location.latitude + json.longitude location.longitude +end diff --git a/app/views/v1/shared/_well_type.jbuilder b/app/views/v1/shared/_well_type.jbuilder new file mode 100644 index 0000000..dd5176e --- /dev/null +++ b/app/views/v1/shared/_well_type.jbuilder @@ -0,0 +1,5 @@ +json.well_type do + json.id well_type.id + json.acronym well_type.acronym + json.name well_type.name +end |
