-
-
{{ $t('common.status') }}
-
{{status}}
+
+
{{ $t('military.militaryStatusTitle') }}
+
{{ status }}
{{ $t('military.affiliationType') }}
-
{{affiliationType}}
+
{{ affiliationType }}
+
+
+
{{ $t('military.auditStatus') }}
+
+
+
{{ auditStatusName }}
+
+
+ {{ auditStatusNote }}
+
+
+
+
+
@@ -75,42 +112,137 @@
@click="editInfo"
/>
-
-
-
- {{ $t('military.endAffiliationModalContent') }}
-
-
-
-
+
+
+
+
+ {{ $t('military.auditApproveConfirmDescription') }}
+
+
+
+
+
+
+
+ {{ $t('military.auditDeclineConfirmDescription') }}
+
+
+
+
+
+
+
+ {{ $t('military.endAffiliationModalContent') }}
+
+
+
+
+
diff --git a/webroot/src/locales/en.json b/webroot/src/locales/en.json
index b9cf9ccd2..8ce476869 100644
--- a/webroot/src/locales/en.json
+++ b/webroot/src/locales/en.json
@@ -940,18 +940,29 @@
"militaryStatusTitle": "Military status",
"updateMilitaryStatusTitle": "Update military status",
"viewMilitaryStatus": "View military status",
+ "auditStatus": "Audit status",
+ "auditApprove": "Approve",
+ "auditApproveConfirmTitle": "Are you sure you want to approve this practitioner’s military status?",
+ "auditApproveConfirmDescription": "Approving confirms their submitted documentation and military-related benefits.",
+ "auditApproveConfirmAction": "Yes, approve status",
+ "auditDecline": "Decline",
+ "auditDeclineConfirmTitle": "Are you sure you want to decline this practitioner’s military status?",
+ "auditDeclineConfirmDescription": "Declining will revoke the user’s military status and remove their discount eligibility.",
+ "auditDeclineConfirmNotesLabel": "Decline notes for practitioner",
+ "auditDeclineConfirmNotesPlaceholder": "Enter the decline reason",
+ "auditDeclineConfirmAction": "Yes, decline status",
"militaryStatusOptions": [
{
- "key": "pending",
- "name": "Pending"
+ "key": "tentative",
+ "name": "Needs review"
},
{
"key": "approved",
"name": "Approved"
},
{
- "key": "denied",
- "name": "Denied"
+ "key": "declined",
+ "name": "Declined"
},
{
"key": "notApplicable",
diff --git a/webroot/src/locales/es.json b/webroot/src/locales/es.json
index c8d42776a..105c1d7f0 100644
--- a/webroot/src/locales/es.json
+++ b/webroot/src/locales/es.json
@@ -923,18 +923,29 @@
"military": {
"militaryStatusTitle": "Estado militar",
"updateMilitaryStatusTitle": "Actualizar el estado militar",
+ "auditStatus": "Estado de la auditoría",
+ "auditApprove": "Aprobar",
+ "auditApproveConfirmTitle": "¿Está seguro de que desea aprobar el estado militar de este practicante?",
+ "auditApproveConfirmDescription": "Al aprobar se confirma la documentación presentada y los beneficios relacionados con el servicio militar.",
+ "auditApproveConfirmAction": "Sí, aprobar estado",
+ "auditDecline": "Rechazar",
+ "auditDeclineConfirmTitle": "¿Está seguro de que desea rechazar el estado militar de este practicante?",
+ "auditDeclineConfirmDescription": "Si rechaza la solicitud, se revocará el estado militar del usuario y se eliminará su elegibilidad para el descuento.",
+ "auditDeclineConfirmNotesLabel": "Notas de rechazo para el practicante",
+ "auditDeclineConfirmNotesPlaceholder": "Ingrese el motivo del rechazo",
+ "auditDeclineConfirmAction": "Sí, rechazar estado",
"militaryStatusOptions": [
{
- "key": "pending",
- "name": "Pendiente"
+ "key": "tentative",
+ "name": "Necesita revisión"
},
{
"key": "approved",
"name": "Aprobado"
},
{
- "key": "denied",
- "name": "Denegado"
+ "key": "declined",
+ "name": "Rechazado"
},
{
"key": "notApplicable",
diff --git a/webroot/src/models/Licensee/Licensee.model.spec.ts b/webroot/src/models/Licensee/Licensee.model.spec.ts
index 71b5c8f93..e69de2ff0 100644
--- a/webroot/src/models/Licensee/Licensee.model.spec.ts
+++ b/webroot/src/models/Licensee/Licensee.model.spec.ts
@@ -60,6 +60,8 @@ describe('Licensee model', () => {
expect(licensee.privilegeStates).to.matchPattern([]);
expect(licensee.privileges).to.matchPattern([]);
expect(licensee.militaryAffiliations).to.matchPattern([]);
+ expect(licensee.militaryStatus).to.equal(null);
+ expect(licensee.militaryStatusNote).to.equal(null);
expect(licensee.lastUpdated).to.equal(null);
expect(licensee.status).to.equal(LicenseeStatus.INACTIVE);
@@ -78,6 +80,7 @@ describe('Licensee model', () => {
expect(licensee.phoneNumberDisplay()).to.equal('');
expect(licensee.isMilitaryStatusActive()).to.equal(false);
expect(licensee.activeMilitaryAffiliation()).to.equal(null);
+ expect(licensee.militaryAuditStatusName()).to.equal('');
expect(licensee.homeJurisdictionLicenses()).to.matchPattern([]);
expect(licensee.activeHomeJurisdictionLicenses()).to.matchPattern([]);
expect(licensee.inactiveHomeJurisdictionLicenses()).to.matchPattern([]);
@@ -111,6 +114,8 @@ describe('Licensee model', () => {
birthMonthDay: '01-16',
ssnLastFour: '0000',
militaryAffiliations: [new MilitaryAffiliation()],
+ militaryStatus: 'approved',
+ militaryStatusNote: 'test-note',
licenseType: LicenseType.AUDIOLOGIST,
licenseStates: [new State()],
licenses: [
@@ -172,6 +177,8 @@ describe('Licensee model', () => {
expect(licensee.privilegeStates[0]).to.be.an.instanceof(State);
expect(licensee.privileges).to.be.an('array').with.length(1);
expect(licensee.privileges[0]).to.be.an.instanceof(License);
+ expect(licensee.militaryStatus).to.equal(data.militaryStatus);
+ expect(licensee.militaryStatusNote).to.equal(data.militaryStatusNote);
expect(licensee.lastUpdated).to.equal(data.lastUpdated);
expect(licensee.status).to.equal(data.status);
@@ -190,6 +197,7 @@ describe('Licensee model', () => {
expect(licensee.phoneNumberDisplay()).to.equal('+1 323-455-8990');
expect(licensee.isMilitaryStatusActive()).to.equal(false);
expect(licensee.activeMilitaryAffiliation()).to.equal(null);
+ expect(licensee.militaryAuditStatusName()).to.equal('Approved');
expect(licensee.homeJurisdictionLicenses()).to.matchPattern([]);
expect(licensee.activeHomeJurisdictionLicenses()).to.matchPattern([]);
expect(licensee.inactiveHomeJurisdictionLicenses()).to.matchPattern([]);
@@ -332,6 +340,8 @@ describe('Licensee model', () => {
}],
status: 'inactive'
}],
+ militaryStatus: 'unsupported',
+ militaryStatusNote: 'note',
licenses: [
{
id: 'test-id',
@@ -436,6 +446,8 @@ describe('Licensee model', () => {
expect(licensee.militaryAffiliations).to.be.an('array').with.length(2);
expect(licensee.militaryAffiliations[0]).to.be.an.instanceof(MilitaryAffiliation);
expect(licensee.militaryAffiliations[1]).to.be.an.instanceof(MilitaryAffiliation);
+ expect(licensee.militaryStatus).to.equal(data.militaryStatus);
+ expect(licensee.militaryStatusNote).to.equal(data.militaryStatusNote);
expect(licensee.status).to.equal(data.licenseStatus);
// Test methods
@@ -467,6 +479,7 @@ describe('Licensee model', () => {
}],
status: 'active'
});
+ expect(licensee.militaryAuditStatusName()).to.equal('');
expect(licensee.homeJurisdictionLicenses()).to.matchPattern([
{
id: 'providerId1-co-audiologist',
diff --git a/webroot/src/models/Licensee/Licensee.model.ts b/webroot/src/models/Licensee/Licensee.model.ts
index a15355592..621a4b3b7 100644
--- a/webroot/src/models/Licensee/Licensee.model.ts
+++ b/webroot/src/models/Licensee/Licensee.model.ts
@@ -50,6 +50,8 @@ export interface InterfaceLicensee {
phoneNumber?: string | null;
licenseType?: LicenseType | null;
militaryAffiliations?: Array
;
+ militaryStatus?: string | null;
+ militaryStatusNote?: string | null;
licenseStates?: Array;
licenses?: Array;
privilegeStates?: Array;
@@ -81,6 +83,8 @@ export class Licensee implements InterfaceLicensee {
public licenses? = [];
public privilegeStates? = [];
public militaryAffiliations? = [];
+ public militaryStatus? = null;
+ public militaryStatusNote? = null;
public privileges? = [];
public lastUpdated? = null;
public status? = LicenseeStatus.INACTIVE;
@@ -214,6 +218,14 @@ export class Licensee implements InterfaceLicensee {
return this.militaryAffiliations?.find((affiliation: MilitaryAffiliation) => affiliation.status as any === 'active') || null;
}
+ public militaryAuditStatusName(): string {
+ const auditStatusTypes = this.$tm('military.militaryStatusOptions') || [];
+ const auditStatusType = auditStatusTypes.find((translate) => translate.key === this.militaryStatus);
+ const auditStatusTypeName = auditStatusType?.name || '';
+
+ return auditStatusTypeName;
+ }
+
public homeJurisdictionLicenses(): Array {
return this.licenses?.filter((license: License) =>
(license.issueState?.abbrev === this.homeJurisdiction?.abbrev)) || [];
@@ -422,6 +434,8 @@ export class LicenseeSerializer {
privilegeStates: [] as Array,
privileges: [] as Array,
militaryAffiliations: [] as Array,
+ militaryStatus: json.militaryStatus,
+ militaryStatusNote: json.militaryStatusNote,
status: json.licenseStatus,
lastUpdated: json.dateOfUpdate,
};
diff --git a/webroot/src/network/data.api.ts b/webroot/src/network/data.api.ts
index 25a4d34d4..834034eda 100644
--- a/webroot/src/network/data.api.ts
+++ b/webroot/src/network/data.api.ts
@@ -159,6 +159,17 @@ export class DataApi {
return licenseDataApi.getAttestation(compact, attestationId);
}
+ /**
+ * PATCH Update Military Audit Status for a licensee.
+ * @param {string} compact A compact type.
+ * @param {string} licenseeId The Licensee ID.
+ * @param {object} data The user request data.
+ * @return {Promise