From 3f6e91cbaf57d1d0c69ab30fee369ef4f0dbe2bf Mon Sep 17 00:00:00 2001
From: rsanchez <rsanchez@curisit.net>
Date: Tue, 14 Mar 2017 15:38:16 +0000
Subject: [PATCH] #3527 fix - Fixing pack form

---
 securis/src/main/webapp/src/app/resources/packs.ts |   15 ++++++---------
 1 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/securis/src/main/webapp/src/app/resources/packs.ts b/securis/src/main/webapp/src/app/resources/packs.ts
index 5caa552..d022dff 100644
--- a/securis/src/main/webapp/src/app/resources/packs.ts
+++ b/securis/src/main/webapp/src/app/resources/packs.ts
@@ -2,6 +2,7 @@
 import { Injectable } from '@angular/core';
 import { Http, RequestOptions } from '@angular/http';
 import { SeCurisResourceServices } from './base';
+import { LocaleService } from '../common/i18n';
 
 var pack_example = { 
   id: 7,
@@ -40,14 +41,6 @@
 				CANCELLED: 'CA'
 		}
 
-export const PACK_STATUSES = {
-				'CR': 'Created',
-				'AC': 'Active',
-				'OH': 'On Hold',
-				'EX': 'Expired',
-				'CA': 'Cancelled'
-		};
-
 export const COLORS_BY_STATUS = {
 					'CR': '#808080',
 					'AC': '#329e5a',
@@ -67,7 +60,7 @@
 
 @Injectable()
 export class PacksService extends SeCurisResourceServices {
-  constructor(http: Http) {
+  constructor(http: Http, private $L: LocaleService) {
     super(http, 'pack');
   }
 
@@ -88,5 +81,9 @@
 		return pack && validStatuses && validStatuses.indexOf(pack.status) !== -1;
 	}
 
+  getStatusName(statusCode: string): string {
+	return this.$L.get(`pack.status.${statusCode}`, this.$L.get('Unknown'));
+  }  
+
 }
 

--
Gitblit v1.3.2