Skip to content

Commit 2f793ba

Browse files
authored
fix: estimate and agreement copy (resolves #2204) (#2206)
* fix: estimate and agreement copy * fix: regulated organization contact info not displayed on public page fix: regulated organization contact info not displayed on public page
1 parent 5560fa9 commit 2f793ba

File tree

14 files changed

+77
-29
lines changed

14 files changed

+77
-29
lines changed

app/Notifications/AgreementReceived.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public function __construct(Project $project)
2020
public function toMail(Project $notifiable): MailMessage
2121
{
2222
return (new MailMessage)
23-
->subject(__('Your agreement has been received'))
23+
->subject(__('Your signed agreement has been received'))
2424
->markdown(
2525
'mail.agreement-received',
2626
[

app/Notifications/EstimateReturned.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public function __construct(Project $project)
2020
public function toMail(Project $notifiable): MailMessage
2121
{
2222
return (new MailMessage)
23-
->subject(__('Your estimate has been returned'))
23+
->subject(__('Engagement estimate has been submitted for your approval'))
2424
->markdown(
2525
'mail.estimate-returned',
2626
[

app/View/Components/Notification/AgreementReceived.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ class AgreementReceived extends Notification
1414
public function __construct(DatabaseNotification $notification)
1515
{
1616
$this->project = Project::find($notification->data['project_id']);
17-
$this->title = __('Your agreement has been received');
17+
$this->title = __('Your signed agreement has been received');
1818
$this->body = safe_markdown('Your agreement has been received for **:project**. You can now publish your project page and engagement details.', [
1919
'project' => $this->project->getTranslation('name', locale()),
2020
]);
21-
$this->interpretation = __('Your agreement has been received', [], 'en');
21+
$this->interpretation = __('Your signed agreement has been received', [], 'en');
2222

2323
parent::__construct($notification);
2424
}

app/View/Components/Notification/EstimateReturned.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ class EstimateReturned extends Notification
1414
public function __construct(DatabaseNotification $notification)
1515
{
1616
$this->project = Project::find($notification->data['project_id']);
17-
$this->title = __('Your estimate has been returned');
17+
$this->title = __('Engagement estimate has been submitted for your approval');
1818
$this->body = safe_markdown('Your estimate for **:project**, along with a project agreement for you to sign, has been sent to <:contact>.', [
1919
'project' => $this->project->getTranslation('name', locale()),
2020
'contact' => $this->project->contact_person_email,
2121
]);
22-
$this->interpretation = __('Your estimate has been returned', [], 'en');
22+
$this->interpretation = __('Engagement estimate has been submitted for your approval', [], 'en');
2323

2424
parent::__construct($notification);
2525
}

database/seeders/data/Interpretations.json

+18-2
Original file line numberDiff line numberDiff line change
@@ -1418,7 +1418,7 @@
14181418
"namespace": "notification_message"
14191419
},
14201420
{
1421-
"name": "Your agreement has been received",
1421+
"name": "Your signed agreement has been received",
14221422
"namespace": "notification_message",
14231423
"video": {
14241424
"lsq": "https://vimeo.com/850176147/a4656f355b"
@@ -1441,7 +1441,7 @@
14411441
}
14421442
},
14431443
{
1444-
"name": "Your estimate has been returned",
1444+
"name": "Engagement estimate has been submitted for your approval",
14451445
"namespace": "notification_message",
14461446
"video": {
14471447
"lsq": "https://vimeo.com/850176184/57b6fadba7"
@@ -4066,6 +4066,9 @@
40664066
"asl": "https://vimeo.com/845049912/2baed11817",
40674067
"lsq": "https://vimeo.com/871137322/b78435aef9"
40684068
}
4069+
},
4070+
{
4071+
"name": "About"
40694072
}
40704073
]
40714074
},
@@ -4077,6 +4080,19 @@
40774080
"asl": "https://vimeo.com/845049953/a83136dada",
40784081
"lsq": "https://vimeo.com/850176016/d00dbf674f"
40794082
}
4083+
},
4084+
{
4085+
"name": "Projects"
4086+
}
4087+
]
4088+
},
4089+
"regulated-organizations.show-contact-information": {
4090+
"interpretations": [
4091+
{
4092+
"name": "Contact information"
4093+
},
4094+
{
4095+
"name": "contact person"
40804096
}
40814097
]
40824098
},

resources/lang/en.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@
151151
"Agreement pending": "Agreement pending",
152152
"Agreement received": "Agreement received",
153153
"Agreements": "Agreements",
154+
"Agreement signed and received": "Agreement signed and received",
154155
"Agreement status": "Agreement status",
155156
"Alberta": "Alberta",
156157
"All": "All",
@@ -569,6 +570,7 @@
569570
"engagement description": "engagement description",
570571
"engagement description (English)": "engagement description (English)",
571572
"engagement description (French)": "engagement description (French)",
573+
"Engagement estimate has been submitted for your approval": "Engagement estimate has been submitted for your approval",
572574
"engagement format": "engagement format",
573575
"Engagement materials": "Engagement materials",
574576
"Engagement meetings": "Engagement meetings",
@@ -587,6 +589,7 @@
587589
"English author name": "English author name",
588590
"Enter your collaboration preferences": "Enter your collaboration preferences",
589591
"Episodic and invisible disabilities": "Episodic and invisible disabilities",
592+
"Estimate and agreement have been sent": "Estimate and agreement have been sent",
590593
"Estimate approved": "Estimate approved",
591594
"Estimate requested": "Estimate requested",
592595
"Estimate returned": "Estimate returned",
@@ -890,9 +893,7 @@
890893
"Manage project": "Manage project",
891894
"Manage this project": "Manage this project",
892895
"Manitoba": "Manitoba",
893-
"Mark agreement as received": "Mark agreement as received",
894896
"Mark as read": "Mark as read",
895-
"Mark estimate as returned": "Mark estimate as returned",
896897
"Mark the estimate as \"returned\" by visiting the link below and searching for :projectable.": "Mark the estimate as \"returned\" by visiting the link below and searching for :projectable.",
897898
"match you to their projects or engagements": "match you to their projects or engagements",
898899
"Materials": "Materials",
@@ -2069,7 +2070,6 @@
20692070
"Your account on the Accessibility Exchange has been suspended.": "Your account on the Accessibility Exchange has been suspended.",
20702071
"Your account on the Accessibility Exchange is no longer suspended.": "Your account on the Accessibility Exchange is no longer suspended.",
20712072
"Your account suspension has been lifted": "Your account suspension has been lifted",
2072-
"Your agreement has been received": "Your agreement has been received",
20732073
"Your agreement has been received for **:project**. You can now publish your project page and engagement details.": "Your agreement has been received for **:project**. You can now publish your project page and engagement details.",
20742074
"Your agreement has been received for :project. You can now publish your project page and engagement details. Sign in to your account at https:\/\/accessibilityexchange.ca to continue.": "Your agreement has been received for :project. You can now publish your project page and engagement details. Sign in to your account at https:\/\/accessibilityexchange.ca to continue.",
20752075
"Your areas of interest have been updated.": "Your areas of interest have been updated.",
@@ -2083,7 +2083,6 @@
20832083
"Your engagement has been updated.": "Your engagement has been updated.",
20842084
"Your engagement translations have been updated.": "Your engagement translations have been updated.",
20852085
"Your estimate for **:project**, along with a project agreement for you to sign, has been sent to <:contact>.": "Your estimate for **:project**, along with a project agreement for you to sign, has been sent to <:contact>.",
2086-
"Your estimate has been returned": "Your estimate has been returned",
20872086
"Your estimate has been returned for :project, along with a project agreement for you to sign. Sign in to your account at https:\/\/accessibilityexchange.ca for further details.": "Your estimate has been returned for :project, along with a project agreement for you to sign. Sign in to your account at https:\/\/accessibilityexchange.ca for further details.",
20882087
"Your federally regulated organization has been deleted.": "Your federally regulated organization has been deleted.",
20892088
"Your federally regulated organization has been updated.": "Your federally regulated organization has been updated.",
@@ -2126,6 +2125,7 @@
21262125
"your public profile will be removed from the platform": "your public profile will be removed from the platform",
21272126
"Your regulated organization, :name, will be deleted and cannot be recovered. If you still want to delete your regulated organization, please enter your current password to proceed.": "Your regulated organization, :name, will be deleted and cannot be recovered. If you still want to delete your regulated organization, please enter your current password to proceed.",
21282127
"Your roles have been saved.": "Your roles have been saved.",
2128+
"Your signed agreement has been received": "Your signed agreement has been received",
21292129
"your support person, :name": "your support person, :name",
21302130
"Your support person’s name is required if they are your preferred contact person.": "Your support person’s name is required if they are your preferred contact person.",
21312131
"Your website accessibility preferences have been updated.": "Your website accessibility preferences have been updated.",

resources/lang/fr.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@
151151
"Agreement pending": "Entente en attente",
152152
"Agreement received": "Entente reçue",
153153
"Agreements": "Ententes",
154+
"Agreement signed and received": "",
154155
"Agreement status": "Statut de l’entente",
155156
"Alberta": "Alberta",
156157
"All": "Tous",
@@ -569,6 +570,7 @@
569570
"engagement description": "description de la consultation",
570571
"engagement description (English)": "description de la consultation (anglais)",
571572
"engagement description (French)": "description de la consultation (français)",
573+
"Engagement estimate has been submitted for your approval": "",
572574
"engagement format": "format de la consultation",
573575
"Engagement materials": "Documents de consultation",
574576
"Engagement meetings": "Réunions de la consultation",
@@ -587,6 +589,7 @@
587589
"English author name": "Nom de l’auteur en anglais",
588590
"Enter your collaboration preferences": "Entrez vos préférences de collaboration",
589591
"Episodic and invisible disabilities": "Incapacités épisodiques et invisibles",
592+
"Estimate and agreement have been sent": "",
590593
"Estimate approved": "Devis approuvé",
591594
"Estimate requested": "Devis demandé",
592595
"Estimate returned": "Devis retourné",
@@ -890,9 +893,7 @@
890893
"Manage project": "Gérer le projet",
891894
"Manage this project": "Gérer ce projet",
892895
"Manitoba": "Manitoba",
893-
"Mark agreement as received": "Marquer l’entente comme reçue",
894896
"Mark as read": "Marquer comme lu",
895-
"Mark estimate as returned": "Marquer le devis comme retourné",
896897
"Mark the estimate as \"returned\" by visiting the link below and searching for :projectable.": "Marquez le devis comme « retourné » en visitant le lien ci-dessous et en recherchant :projectable.",
897898
"match you to their projects or engagements": "vous jumeler à leurs projets ou consultations",
898899
"Materials": "Matériels",
@@ -2069,7 +2070,6 @@
20692070
"Your account on the Accessibility Exchange has been suspended.": "Votre compte sur le Connecteur pour l’accessibilité a été suspendu.",
20702071
"Your account on the Accessibility Exchange is no longer suspended.": "Votre compte sur le Connecteur pour l’accessibilité a été réinstauré.",
20712072
"Your account suspension has been lifted": "La suspension de votre compte a été levée",
2072-
"Your agreement has been received": "Votre entente a été reçue",
20732073
"Your agreement has been received for **:project**. You can now publish your project page and engagement details.": "Votre entente a été reçue pour **:project**. Vous pouvez maintenant publier votre page de projet et les détails de votre consultation.",
20742074
"Your agreement has been received for :project. You can now publish your project page and engagement details. Sign in to your account at https:\/\/accessibilityexchange.ca to continue.": "Votre entente a été reçue pour :project. Vous pouvez maintenant publier votre page de projet et les détails de votre consultation. Connectez-vous à votre compte sur https:\/\/accessibilityexchange.ca pour continuer.",
20752075
"Your areas of interest have been updated.": "Vos centres d’intérêt ont été mis à jour.",
@@ -2083,7 +2083,6 @@
20832083
"Your engagement has been updated.": "Votre consultation a été mise à jour.",
20842084
"Your engagement translations have been updated.": "Les traductions de vos consultations ont été mises à jour.",
20852085
"Your estimate for **:project**, along with a project agreement for you to sign, has been sent to <:contact>.": "Votre devis pour **:project**, ainsi qu’une entente à signer ont été envoyés à <:contact>.",
2086-
"Your estimate has been returned": "Votre devis a été retourné",
20872086
"Your estimate has been returned for :project, along with a project agreement for you to sign. Sign in to your account at https:\/\/accessibilityexchange.ca for further details.": "Votre devis a été renvoyé pour le projet :project, ainsi qu’une etente de projet à signer. Connectez-vous à votre compte sur https:\/\/accessibilityexchange.ca pour plus de détails.",
20882087
"Your federally regulated organization has been deleted.": "Votre organisation sous réglementation fédérale a été supprimée.",
20892088
"Your federally regulated organization has been updated.": "Votre organisation sous réglementation fédérale a été mise à jour.",
@@ -2126,6 +2125,7 @@
21262125
"your public profile will be removed from the platform": "votre profil public sera supprimé de la plateforme",
21272126
"Your regulated organization, :name, will be deleted and cannot be recovered. If you still want to delete your regulated organization, please enter your current password to proceed.": "Votre organisme réglementé, :name, sera supprimé et ne pourra pas être récupéré. Si vous souhaitez toujours supprimer votre organisme réglementé, veuillez saisir votre mot de passe actuel pour continuer.",
21282127
"Your roles have been saved.": "Vos rôles ont été enregistrés.",
2128+
"Your signed agreement has been received": "",
21292129
"your support person, :name": "la personne vous apportant du soutien, :name",
21302130
"Your support person’s name is required if they are your preferred contact person.": "Le nom de la personne vous apportant du soutien est requis s’il s’agit de votre personne de contact.",
21312131
"Your website accessibility preferences have been updated.": "Vos préférences en matière d’accessibilité pour le site Internet ont été mises à jour.",

resources/views/livewire/admin-estimates-and-agreements.blade.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,12 @@
8383
<td>
8484
@if ($project->estimate_returned_at && !$project->agreement_received_at)
8585
<button class="secondary"
86-
wire:click="markAgreementReceived({{ $project->id }})">{{ __('Mark agreement as received') }}
86+
wire:click="markAgreementReceived({{ $project->id }})">{{ __('Agreement signed and received') }}
8787
<span class="sr-only">{{ __('for :project', ['project' => $project->name]) }}</span>
8888
</button>
8989
@elseif(!$project->estimate_returned_at)
9090
<button class="secondary"
91-
wire:click="markEstimateReturned({{ $project->id }})">{{ __('Mark estimate as returned') }}
91+
wire:click="markEstimateReturned({{ $project->id }})">{{ __('Estimate and agreement have been sent') }}
9292
<span class="sr-only">{{ __('for :project', ['project' => $project->name]) }}</span>
9393
</button>
9494
@endif
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<h3>{{ $regulatedOrganization->contact_person_name }}</h3>
2+
<x-interpretation name="{{ __('contact person', [], 'en') }}" />
3+
4+
@if ($regulatedOrganization->contact_person_email)
5+
<x-contact-point type="email" :value="$regulatedOrganization->contact_person_email" :preferred="$regulatedOrganization->preferred_contact_method === 'email' &&
6+
$regulatedOrganization->contact_person_phone" />
7+
@endif
8+
@if ($regulatedOrganization->contact_person_phone)
9+
<x-contact-point type="phone" :value="$regulatedOrganization->contact_person_phone" :preferred="$regulatedOrganization->preferred_contact_method === 'phone' &&
10+
$regulatedOrganization->contact_person_email" :vrs="$regulatedOrganization->contact_person_vrs" />
11+
@endif

resources/views/regulated-organizations/show.blade.php

+12
Original file line numberDiff line numberDiff line change
@@ -116,19 +116,31 @@
116116
<li>
117117
<x-nav-link :href="localized_route('regulated-organizations.show-projects', $regulatedOrganization)" :active="request()->localizedRouteIs('regulated-organizations.show-projects')">{{ __('Projects') }}</x-nav-link>
118118
</li>
119+
<li>
120+
<x-nav-link :href="localized_route(
121+
'regulated-organizations.show-contact-information',
122+
$regulatedOrganization,
123+
)" :active="request()->localizedRouteIs('regulated-organizations.show-contact-information')">{{ __('Contact information') }}</x-nav-link>
124+
</li>
119125
</ul>
120126
</nav>
121127
<div class="stack">
122128
@if (request()->localizedRouteIs('regulated-organizations.show'))
123129
<x-section-heading :name="__('About')" :model="$regulatedOrganization" :href="localized_route('regulated-organizations.edit', $regulatedOrganization)" />
130+
<x-interpretation name="{{ __('About', [], 'en') }}" />
124131
@include('regulated-organizations.partials.about')
125132
@elseif(request()->localizedRouteIs('regulated-organizations.show-projects'))
126133
<h2 class="repel">{{ __('Projects') }} @can('update', $regulatedOrganization)
127134
<a class="cta secondary"
128135
href="{{ $regulatedOrganization->projects->count() > 0 ? localized_route('projects.show-context-selection') : localized_route('projects.show-language-selection') }}">{{ __('Create a project') }}</a>
129136
@endcan
130137
</h2>
138+
<x-interpretation name="{{ __('Projects', [], 'en') }}" />
131139
@include('regulated-organizations.partials.projects')
140+
@elseif(request()->localizedRouteIs('regulated-organizations.show-contact-information'))
141+
<x-section-heading :name="__('Contact information')" :model="$regulatedOrganization" :href="localized_route('regulated-organizations.edit', $regulatedOrganization)" />
142+
<x-interpretation name="{{ __('Contact information', [], 'en') }}" />
143+
@include('regulated-organizations.partials.contact-information')
132144
@endif
133145
</div>
134146
</div>

routes/regulated-organizations.php

+4
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@
4141
->middleware(['auth', 'can:view,regulatedOrganization'])
4242
->name('show');
4343

44+
Route::multilingual('/{regulatedOrganization}/contact-information', 'show')
45+
->middleware(['auth', 'can:view,regulatedOrganization'])
46+
->name('show-contact-information');
47+
4448
Route::multilingual('/{regulatedOrganization}/projects', 'show')
4549
->middleware(['auth', 'can:view,regulatedOrganization'])
4650
->name('show-projects');

0 commit comments

Comments
 (0)