From c255bebef9861ea3faeaa57278d5bdc319db71f8 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Sun, 30 Jun 2019 09:32:23 +0300 Subject: [PATCH] Vacation Rule Going on --- Mohem/package-lock.json | 143 +- Mohem/package.json | 3 +- Mohem/src/app/app.scss | 9 + Mohem/src/app/home/home.page.html | 2 +- .../create-vacation-rule.component.html | 84 + .../create-vacation-rule.component.scss | 14 + .../create-vacation-rule.component.spec.ts | 27 + .../create-vacation-rule.component.ts | 107 + .../vacation-rule/home/home.component.html | 16 +- .../vacation-rule/home/home.component.scss | 1 + .../model/VacationTypeRequest.ts | 8 + .../model/notification.Request.ts | 8 + .../model/notification.Respond.ts | 10 + .../notification-type.component.html | 83 + .../notification-type.component.scss | 20 + .../notification-type.component.spec.ts | 27 + .../notification-type.component.ts | 49 + .../service/vacation-rule-service.service.ts | 25 +- .../app/vacation-rule/vacation-rule.module.ts | 14 +- .../vacation-type.component.html | 45 +- .../vacation-type.component.scss | 19 + .../vacation-type/vacation-type.component.ts | 48 +- Mohem/src/assets/localization/i18n.json | 1823 +++++++++-------- 23 files changed, 1545 insertions(+), 1040 deletions(-) create mode 100644 Mohem/src/app/vacation-rule/create-vacation-rule/create-vacation-rule.component.html create mode 100644 Mohem/src/app/vacation-rule/create-vacation-rule/create-vacation-rule.component.scss create mode 100644 Mohem/src/app/vacation-rule/create-vacation-rule/create-vacation-rule.component.spec.ts create mode 100644 Mohem/src/app/vacation-rule/create-vacation-rule/create-vacation-rule.component.ts create mode 100644 Mohem/src/app/vacation-rule/model/VacationTypeRequest.ts create mode 100644 Mohem/src/app/vacation-rule/model/notification.Request.ts create mode 100644 Mohem/src/app/vacation-rule/model/notification.Respond.ts create mode 100644 Mohem/src/app/vacation-rule/notification-type/notification-type.component.html create mode 100644 Mohem/src/app/vacation-rule/notification-type/notification-type.component.scss create mode 100644 Mohem/src/app/vacation-rule/notification-type/notification-type.component.spec.ts create mode 100644 Mohem/src/app/vacation-rule/notification-type/notification-type.component.ts diff --git a/Mohem/package-lock.json b/Mohem/package-lock.json index 32c46d95..99358649 100644 --- a/Mohem/package-lock.json +++ b/Mohem/package-lock.json @@ -835,21 +835,6 @@ } } }, - "@ionic-native/barcode-scanner": { - "version": "5.8.0", - "resolved": "https://registry.npmjs.org/@ionic-native/barcode-scanner/-/barcode-scanner-5.8.0.tgz", - "integrity": "sha512-fypCb/8MikdTPaUl+oAtK+abrdgWnsYk3FtN3HPcNU4VB53QtBrx4LFC0l9xXD9rW8S7S0Xr2uHogtzhbh1bdg==", - "requires": { - "@types/cordova": "^0.0.34" - }, - "dependencies": { - "@types/cordova": { - "version": "0.0.34", - "resolved": "https://registry.npmjs.org/@types/cordova/-/cordova-0.0.34.tgz", - "integrity": "sha1-6nrd907Ow9dimCegw54smt3HPQQ=" - } - } - }, "@ionic-native/ble": { "version": "5.8.0", "resolved": "https://registry.npmjs.org/@ionic-native/ble/-/ble-5.8.0.tgz", @@ -963,21 +948,6 @@ } } }, - "@ionic-native/health": { - "version": "5.8.0", - "resolved": "https://registry.npmjs.org/@ionic-native/health/-/health-5.8.0.tgz", - "integrity": "sha512-zpBJJYuX3Oe39qhMSXeUb6Zreco5pu5fJBOuhPQy2pexgh6GwdEctNNC37SdHq2MK9afzraj+aiVJlNhDsLDsQ==", - "requires": { - "@types/cordova": "^0.0.34" - }, - "dependencies": { - "@types/cordova": { - "version": "0.0.34", - "resolved": "https://registry.npmjs.org/@types/cordova/-/cordova-0.0.34.tgz", - "integrity": "sha1-6nrd907Ow9dimCegw54smt3HPQQ=" - } - } - }, "@ionic-native/in-app-browser": { "version": "5.8.0", "resolved": "https://registry.npmjs.org/@ionic-native/in-app-browser/-/in-app-browser-5.8.0.tgz", @@ -1053,21 +1023,6 @@ } } }, - "@ionic-native/push": { - "version": "5.8.0", - "resolved": "https://registry.npmjs.org/@ionic-native/push/-/push-5.8.0.tgz", - "integrity": "sha512-JLfw8fMzZIskKU3fG7UO4POQTNoIY2IfGKYV8Q+cf45LFg+tLJSlN14y0ZPr3bm7y9DacQtiKQsErpIZLT64yw==", - "requires": { - "@types/cordova": "^0.0.34" - }, - "dependencies": { - "@types/cordova": { - "version": "0.0.34", - "resolved": "https://registry.npmjs.org/@types/cordova/-/cordova-0.0.34.tgz", - "integrity": "sha1-6nrd907Ow9dimCegw54smt3HPQQ=" - } - } - }, "@ionic-native/sms": { "version": "5.8.0", "resolved": "https://registry.npmjs.org/@ionic-native/sms/-/sms-5.8.0.tgz", @@ -1596,7 +1551,9 @@ "abbrev": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "dev": true, + "optional": true }, "accepts": { "version": "1.3.7", @@ -2075,11 +2032,6 @@ "babel-runtime": "^6.22.0" } }, - "babel-plugin-add-header-comment": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/babel-plugin-add-header-comment/-/babel-plugin-add-header-comment-1.0.3.tgz", - "integrity": "sha1-URxJAQYmQNWkgLSsPt1pRBlYUOw=" - }, "babel-runtime": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", @@ -3357,23 +3309,6 @@ } } }, - "cordova-android-support-gradle-release": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cordova-android-support-gradle-release/-/cordova-android-support-gradle-release-2.1.0.tgz", - "integrity": "sha512-rKqNQ5PCHuZ/qUWYrLz5dKJpdJ/ArkhTCEv4CxbFuny0a0JNg5lwufmZ7qfVIqxoK0Nvs9XsIYKiFSGxaQ8lTg==", - "requires": { - "q": "^1.4.1", - "semver": "5.1.0", - "xml2js": "~0.4.19" - }, - "dependencies": { - "semver": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.1.0.tgz", - "integrity": "sha1-hfLPhVBGXE3wAM99hvawVBBqueU=" - } - } - }, "cordova-browser": { "version": "5.0.4", "resolved": "https://registry.npmjs.org/cordova-browser/-/cordova-browser-5.0.4.tgz", @@ -4408,11 +4343,6 @@ "resolved": "https://registry.npmjs.org/cordova-plugin-globalization/-/cordova-plugin-globalization-1.11.0.tgz", "integrity": "sha1-6sMVgQAphJOvowvolA5pj2HvvP4=" }, - "cordova-plugin-health": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/cordova-plugin-health/-/cordova-plugin-health-1.1.3.tgz", - "integrity": "sha512-hX2C95AetTbeQ5OXOu7xugDQhJVhSe7hnbmN3EJccbRvy5dN/vaWE/MaYhdzZxrOzYSd2V/z6lLJliWVX5bRjA==" - }, "cordova-plugin-inappbrowser": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/cordova-plugin-inappbrowser/-/cordova-plugin-inappbrowser-3.0.0.tgz", @@ -4433,11 +4363,6 @@ "resolved": "https://registry.npmjs.org/cordova-plugin-local-notification/-/cordova-plugin-local-notification-0.9.0-beta.2.tgz", "integrity": "sha512-63n77K1pt8dnbWnNR8QWETi9Glezi1bvNHvHWmGNIOv0xCb0phZnm+Ku49BQ+omwe8Z5voMvrA4I03SYPpv38w==" }, - "cordova-plugin-mauron85-background-geolocation": { - "version": "3.0.0-alpha.50", - "resolved": "https://registry.npmjs.org/cordova-plugin-mauron85-background-geolocation/-/cordova-plugin-mauron85-background-geolocation-3.0.0-alpha.50.tgz", - "integrity": "sha512-TVdsJ4gPOuFANB3SX/bDLp4igK6o5nPXO95+tv9RpLr5Rwh2XhiozmEpaC0mnMFiuKi6j1xbaZLklhhVBwC14w==" - }, "cordova-plugin-nativestorage": { "version": "2.3.2", "resolved": "https://registry.npmjs.org/cordova-plugin-nativestorage/-/cordova-plugin-nativestorage-2.3.2.tgz", @@ -4486,11 +4411,6 @@ "resolved": "https://registry.npmjs.org/cordova-sqlite-storage-dependencies/-/cordova-sqlite-storage-dependencies-2.0.0.tgz", "integrity": "sha512-aYD5Cn1TJwgPmpZhQUYq4gOv5t+imzIxGo4SVa/fwEB/pLhiahi+2xK5gLd79YHrz6WdzFBr/126UPXhlSqRWA==" }, - "cordova-support-google-services": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/cordova-support-google-services/-/cordova-support-google-services-1.3.1.tgz", - "integrity": "sha512-YbFWYBSkbErZh/moothPZG/p1p79ytXTc0iR4YHypBXg9TSDp7M7wm5eKk0f6wV4Ugv6a7UgBvAEtq2nllI8UA==" - }, "cordova.plugins.diagnostic": { "version": "4.0.12", "resolved": "https://registry.npmjs.org/cordova.plugins.diagnostic/-/cordova.plugins.diagnostic-4.0.12.tgz", @@ -7417,11 +7337,6 @@ } } }, - "install": { - "version": "0.8.9", - "resolved": "https://registry.npmjs.org/install/-/install-0.8.9.tgz", - "integrity": "sha1-n0tcDRhR74cunfheT3Fi1OXc2+0=" - }, "internal-ip": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/internal-ip/-/internal-ip-3.0.1.tgz", @@ -7435,7 +7350,8 @@ "interpret": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.2.0.tgz", - "integrity": "sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw==" + "integrity": "sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw==", + "dev": true }, "invariant": { "version": "2.2.4", @@ -9418,7 +9334,8 @@ "os-homedir": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=" + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", + "dev": true }, "os-locale": { "version": "1.4.0", @@ -9433,12 +9350,14 @@ "os-tmpdir": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true }, "osenv": { "version": "0.1.5", "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", + "dev": true, "requires": { "os-homedir": "^1.0.0", "os-tmpdir": "^1.0.0" @@ -9757,7 +9676,8 @@ "path-parse": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==" + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "dev": true }, "path-to-regexp": { "version": "0.1.7", @@ -9798,40 +9718,11 @@ "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", "dev": true }, - "phonegap-plugin-barcodescanner": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/phonegap-plugin-barcodescanner/-/phonegap-plugin-barcodescanner-8.1.0.tgz", - "integrity": "sha512-WQCDCoH9EQ9WEn2bce+B95jbNJduilAn2Vtske8KfcYAeGu7bdFqRD7zGCLCQao62VwoEwlX0cUvbQ/am12Jwg==", - "requires": { - "nopt": "^4.0.1", - "shelljs": "^0.8.3" - }, - "dependencies": { - "nopt": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz", - "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=", - "requires": { - "abbrev": "1", - "osenv": "^0.1.4" - } - } - } - }, "phonegap-plugin-multidex": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/phonegap-plugin-multidex/-/phonegap-plugin-multidex-1.0.0.tgz", "integrity": "sha512-1wvc3iQOQpEBaQbXgLxA2JUiLSQ2azdF/bF29ghXDiQJWSpQ1BF8gSuqttM8WZoj081Ps8OKL0gYxdDBkFNPqA==" }, - "phonegap-plugin-push": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/phonegap-plugin-push/-/phonegap-plugin-push-2.2.3.tgz", - "integrity": "sha512-5mjT0G1vfRhXVnZFLwjfzcFwYjVRMibgYDCfYvEujGsP8YwwrIIzcf+xBYAjQV/W2JCjzuNaYd7xJ0yVQaPeig==", - "requires": { - "babel-plugin-add-header-comment": "^1.0.3", - "install": "^0.8.2" - } - }, "pify": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", @@ -10209,7 +10100,8 @@ "q": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/q/-/q-1.4.1.tgz", - "integrity": "sha1-VXBbzZPF82c1MMLCy8DCs63cKG4=" + "integrity": "sha1-VXBbzZPF82c1MMLCy8DCs63cKG4=", + "dev": true }, "qjobs": { "version": "1.2.0", @@ -10404,6 +10296,7 @@ "version": "0.6.2", "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", + "dev": true, "requires": { "resolve": "^1.1.6" } @@ -10558,6 +10451,7 @@ "version": "1.11.0", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.11.0.tgz", "integrity": "sha512-WL2pBDjqT6pGUNSUzMw00o4T7If+z4H2x3Gz893WoUQ5KW8Vr9txp00ykiP16VBaZF5+j/OcXJHZ9+PCvdiDKw==", + "dev": true, "requires": { "path-parse": "^1.0.6" } @@ -11010,6 +10904,7 @@ "version": "0.8.3", "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.3.tgz", "integrity": "sha512-fc0BKlAWiLpwZljmOvAOTE/gXawtCoNrP5oaY7KIaQbbyHeQVg01pSEuEGvGh3HEdBU4baCD7wQBwADmM/7f7A==", + "dev": true, "requires": { "glob": "^7.0.0", "interpret": "^1.0.0", @@ -13130,6 +13025,7 @@ "version": "0.4.19", "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz", "integrity": "sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q==", + "dev": true, "requires": { "sax": ">=0.6.0", "xmlbuilder": "~9.0.1" @@ -13138,7 +13034,8 @@ "sax": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", - "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", + "dev": true } } }, diff --git a/Mohem/package.json b/Mohem/package.json index a43cfecc..47be0383 100644 --- a/Mohem/package.json +++ b/Mohem/package.json @@ -82,6 +82,7 @@ "cordova.plugins.diagnostic": "^4.0.12", "core-js": "^2.5.4", "date-fns": "^1.30.1", + "moment": "^2.24.0", "mx.ferreyra.callnumber": "0.0.2", "phonegap-plugin-multidex": "^1.0.0", "primeicons": "^1.0.0", @@ -159,4 +160,4 @@ "android" ] } -} \ No newline at end of file +} diff --git a/Mohem/src/app/app.scss b/Mohem/src/app/app.scss index 45ab8719..ebdaeb55 100644 --- a/Mohem/src/app/app.scss +++ b/Mohem/src/app/app.scss @@ -5,3 +5,12 @@ // file can hold Sass mixins, functions, and placeholder classes to be imported // and used throughout the application. +.alert-radio-label.sc-ion-alert-md, +.alert-radio-label.sc-ion-alert-ios { + white-space: normal; +} + +.alert-tappable.sc-ion-alert-md, + .alert-tappable.sc-ion-alert-ios { + height: 50px; +} diff --git a/Mohem/src/app/home/home.page.html b/Mohem/src/app/home/home.page.html index f66a8652..375f25ce 100644 --- a/Mohem/src/app/home/home.page.html +++ b/Mohem/src/app/home/home.page.html @@ -39,7 +39,7 @@ diff --git a/Mohem/src/app/vacation-rule/create-vacation-rule/create-vacation-rule.component.html b/Mohem/src/app/vacation-rule/create-vacation-rule/create-vacation-rule.component.html new file mode 100644 index 00000000..e1cf75d5 --- /dev/null +++ b/Mohem/src/app/vacation-rule/create-vacation-rule/create-vacation-rule.component.html @@ -0,0 +1,84 @@ + + + + {{ 'vacation-rule, create-vacation-rule' | translate}} + + + + + + +
    + + + +
  • {{'vacation-rule, itemType' | translate}}
  • + +
    + + +
  • {{'vacation-rule, notification-type' | translate}}
  • + +
    + + +
  • {{'vacation-rule, create-vacation-rule' | translate}}
  • + +
    +
    +
+ + + + {{'vacation-rule, itemType' | translate}} + {{P_ITEM_TYPE_TITLE}} + + + {{'vacation-rule, notification' | translate}} + {{Notification_Title}} + + + {{'vacation-rule, start-date' | translate}} + + + + {{'vacation-rule, end-date' | translate}} + + + + {{'vacation-rule, message-label' | translate}} + + + + + + {{assignMode.RADIO_BUTTON_LABEL}} + + + + {{'createVacationRule.deliver' | translate}} + + + + + {{'createVacationRule.close' | translate}} + + + + + + {{'createVacationRule.respond' | translate}} + + + + + + +
+ +
\ No newline at end of file diff --git a/Mohem/src/app/vacation-rule/create-vacation-rule/create-vacation-rule.component.scss b/Mohem/src/app/vacation-rule/create-vacation-rule/create-vacation-rule.component.scss new file mode 100644 index 00000000..ea1b58d3 --- /dev/null +++ b/Mohem/src/app/vacation-rule/create-vacation-rule/create-vacation-rule.component.scss @@ -0,0 +1,14 @@ +li { + width: 100%; +} + +.label { + white-space: normal; + font-size: smaller; +} + +ion-list, +ion-item { + width: 100%; + margin-right: 7%; +} diff --git a/Mohem/src/app/vacation-rule/create-vacation-rule/create-vacation-rule.component.spec.ts b/Mohem/src/app/vacation-rule/create-vacation-rule/create-vacation-rule.component.spec.ts new file mode 100644 index 00000000..5f278530 --- /dev/null +++ b/Mohem/src/app/vacation-rule/create-vacation-rule/create-vacation-rule.component.spec.ts @@ -0,0 +1,27 @@ +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { CreateVacationRuleComponent } from './create-vacation-rule.component'; + +describe('CreateVacationRuleComponent', () => { + let component: CreateVacationRuleComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ CreateVacationRuleComponent ], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(CreateVacationRuleComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/Mohem/src/app/vacation-rule/create-vacation-rule/create-vacation-rule.component.ts b/Mohem/src/app/vacation-rule/create-vacation-rule/create-vacation-rule.component.ts new file mode 100644 index 00000000..c0cf23d8 --- /dev/null +++ b/Mohem/src/app/vacation-rule/create-vacation-rule/create-vacation-rule.component.ts @@ -0,0 +1,107 @@ +import { Component, OnInit } from '@angular/core'; +import * as moment from 'moment'; +import { VacationRuleServiceService } from '../service/vacation-rule-service.service'; +import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service'; +import { CommonService } from 'src/app/hmg-common/services/common/common.service'; +import { LoginRequest } from 'src/app/hmg-common/services/authentication/models/login.request'; + +@Component({ + selector: 'app-create-vacation-rule', + templateUrl: './create-vacation-rule.component.html', + styleUrls: ['./create-vacation-rule.component.scss'], +}) +export class CreateVacationRuleComponent implements OnInit { + + P_RESPOND_ATTRIBUTES_TBL: any; + P_ITEM_TYPE_TITLE: any = ""; + Notification_Title: any = ""; + isDeliver: boolean = false; + showForType_Y: boolean = false; + Resp2_val: any; + Sdate: any; + // startTime: any; + //endTime: any; + Edate: any; + msgVal: any; + selEmployeeName: any; + selEmployeeID: any; + employeeSel: any; + replacmentEmployeeInfo: any; + itemType: any; + notificationType: any; + RespondAttributeList: any; + // vacationRuleRequest: createVacationRequest; + REASSIGN_val: any; + schemaNotific: any; + notifTypeSel: any; + // pAction: any; + isUpdate: boolean = false; + updateData: any; + forwordAtt: any = ""; + SelAction: string = ""; + hideForwordEmployee: any; + exampleJsonObject: any; + + constructor(public vacationRuleService: VacationRuleServiceService, public ts: TranslatorService, public cs: CommonService) { + this.Sdate = moment().format('YYYY-MM-DDTHH:mm:ssZ'); + } + + ngOnInit() { + this.getNotificationReassign(); + } + + getNotificationReassign() { + let request: LoginRequest = new LoginRequest(); + + this.vacationRuleService.notificationReassign(request, () => { + this.getNotificationReassign(); + }, this.ts.trPK('general', 'retry')).subscribe((result) => { + console.log(result); + if (this.cs.validResponse(result)) { + console.log(result.GetNotificationReassignModeList); + this.REASSIGN_val = result.GetNotificationReassignModeList;//[0].RADIO_BUTTON_ACTION; + this.notifTypeSel = this.REASSIGN_val[0].RADIO_BUTTON_ACTION; + this.reverseAction(); + } else { + this.cs.presentAlert(result.ErrorEndUserMessage); + } + }); + } + + reverseAction() { + if (this.updateData) { + switch (this.SelAction) { + case 'FORWARD': { + this.notifTypeSel = "DELEGATE"; + break; + } + case 'RESPOND': { + this.notifTypeSel = "RESPOND"; + break; + } + case 'CLOSE': { + this.notifTypeSel = "CLOSE"; + break; + } + case 'NOOP': { + this.notifTypeSel = "DELIVER"; + break; + } + case 'TRANSFER': { + this.notifTypeSel = "TRANSFER"; + break; + } + default: { + this.notifTypeSel = ""; + break; + } + } + } + } + + respondAttributes() { + + } + + +} diff --git a/Mohem/src/app/vacation-rule/home/home.component.html b/Mohem/src/app/vacation-rule/home/home.component.html index 083e3438..f9c2e08e 100644 --- a/Mohem/src/app/vacation-rule/home/home.component.html +++ b/Mohem/src/app/vacation-rule/home/home.component.html @@ -1,18 +1,18 @@ - {{ 'vacation-rule, vacation-rule-label' | translate}} + {{ 'vacation-rule, vacationRule' | translate}} -
+
- {{'vacation-rule, rule-Info' | translate}} + {{'vacation-rule, ruleInfo' | translate}}