MOBILE-2768 policy: Display Inactive badge in certain policies

main
Dani Palou 2024-03-21 09:16:46 +01:00
parent 4843fdc619
commit 5215ff91e5
5 changed files with 7 additions and 3 deletions

View File

@ -86,10 +86,9 @@
"addon.block_timeline.sortbycourses": "block_timeline",
"addon.block_timeline.sortbydates": "block_timeline",
"addon.blog.addnewentry": "blog",
"addon.blog.associations": "blog",
"addon.blog.associatewithcourse": "blog",
"addon.blog.associatewithmodule": "blog",
"addon.blog.attachment": "blog",
"addon.blog.associations": "blog",
"addon.blog.blog": "blog",
"addon.blog.blogentries": "blog",
"addon.blog.entrybody": "blog",
@ -2321,6 +2320,7 @@
"core.policy.responseon": "tool_policy",
"core.policy.sitepolicynotagreederror": "local_moodlemobileapp",
"core.policy.status1": "tool_policy",
"core.policy.status2": "tool_policy",
"core.policy.steppolicies": "tool_policy",
"core.policy.useracceptanceactionaccept": "tool_policy",
"core.policy.useracceptanceactionacceptone": "tool_policy",

View File

@ -1,7 +1,6 @@
{
"addnewentry": "Add a new entry",
"associations": "Associations",
"attachment": "Attachment",
"blog": "Blog",
"blogentries": "Blog entries",
"entrybody": "Blog entry body",

View File

@ -28,6 +28,7 @@
"sitepolicynotagreederror": "Site policy not agreed.",
"steppolicies": "Policy {{$a.numpolicy}} out of {{$a.totalpolicies}}",
"status1": "Active",
"status2": "Inactive",
"useracceptanceactionaccept": "Accept",
"useracceptanceactionacceptone": "Accept {{$a}}",
"useracceptanceactiondecline": "Decline",

View File

@ -82,6 +82,9 @@
<ion-badge color="success" *ngIf="policy.status === activeStatus">
{{ 'core.policy.status1' | translate }}
</ion-badge>
<ion-badge color="danger" *ngIf="!isPreviousVersion && policy.status === inactiveStatus">
{{ 'core.policy.status2' | translate }}
</ion-badge>
<ion-badge color="info" *ngIf="policy.optional">
{{ 'core.policy.policydocoptionalyes' | translate }}
</ion-badge>

View File

@ -41,6 +41,7 @@ export class CorePolicyAcceptancesPage implements OnInit, OnDestroy {
dataLoaded = false;
policies: ActiveSitePolicy[] = [];
activeStatus = CorePolicyStatus.Active;
inactiveStatus = CorePolicyStatus.Archived;
isTablet = false;
hasOnBehalf = false;
canContactDPO = false;