# UcapprovalR3

This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 9.1.1.

## Version
notes:new ui under canary.x tags

Version 3.4.0
1. update new ui from using tab into subsection

Version 3.3.9
1. add InputObj.IsDefaultRejectFinal

Version 3.3.8
1. add output callback

Version 3.3.7
1. Fix: voting on top level change reject to reject final

Version 3.3.6
1. filter task history by approval type

Version 3.3.5 (skip this version)

Version 3.3.4
1. Fix: Multi-Tab approval wrong next node approver

Version 3.3.3
1. add Additional Approval InputObj.PathUrlGetPagingObj

Version 3.3.2
1. additional approval support update requested approval type

Version 3.3.1
1. fix support additional approval

Version 3.3.0
1. add support additional approval, can be set from scheme setting level option (web approval)

Version 3.2.5
1. change text 'Approver' to 'Next Approver' 

Version 3.2.4
1. auto select approver if only has 1 option

Version 3.2.3
1. add conditional parameter IsReturnToRequestorOnly - if "true" ReturnTo option default to requestor only

Version 3.2.2
1. add conditional parameter isAllowedApvFinal - if "true" can approve final and otherwise

Version 3.2.1
1. fix approve final, reject final, and reject forward behaviour for multi approval

Version 3.2.0
1. support multi approval

Version 3.1.1
1. fix notes required when approve action 'return'

Version 3.1.0
1. add ShowApvHistory for on/off approval history
2. support conditional required for notes - using notesReqWhen and requiredNotes must be true
3. enabled spinner after choose approval action

Version 3.0.9
1. add * mandatory sign if form is required

Version 3.0.8
1. Add property requiredNotes (will override EnableRequiredNotes)

Version 3.0.7
1. update button font

Version 3.0.6
1. fix button cancel color

Version 3.0.5
1. add button hover

Version 3.0.4
1. revert font family

Version 3.0.3
1. Fix UI

Version 3.0.0
1. Upgrade angular version 13

Version 1.1.10 (Angular 13) / 1.2.10 (Angular 7)
1. Penambahan informasi Username dan RoleCode di section NodeSelectModels

Version 1.1.9 (Angular 13) / 1.2.9 (Angular 7)
1. Penambahan UcShowErrors + css

Version 1.2.3
1. Penambahan param OfficeCodes pada getNextNodeMember

Version 1.2.2
1. Perbaikan validasi reject forward

Version 1.2.1
1. Add field UsernameDescr for selected user

Version 1.0.37
1. Add property EnableRequiredNotes for Approve

Version 1.0.36
1. Add property OfficeCodes for filter Next Member

Version 1.0.35
1. update folder/file name to lower-case

Version 1.0.34
1. Perbaikan bug DDLReasonChangeEvent

Version 1.0.33
1. Perbaikan perubahan response GetReasonActive

Version 1.0.32
1. Perubahan Style

Version 1.0.31
1. Perubahan data result jadi data submit

Version 1.0.30
1. Perbaikan Style

Version 1.0.29
1. Penambahan ResetAction

Version 1.0.28
1. Perbaikan validasi Reject Final dan Reject Forward

Version 1.0.27
1. Add flag IsReturnToSpesific

Version 1.0.26
1. Perbaikan Path Return

Version 1.0.25
1. Penambahan Specific Return

Version 1.0.24
1. Perbaikan bug Reject final

Version 1.0.20
1. Validation Message

Version 1.0.18
1. Validasi submit

Version 1.0.17
1. perbaikan validasi

Version 1.0.15
1. Perbaikan kondisi Approve Final

Version 1.0.14
1. Perbaikan CSS

Version 1.0.13
1. Perbaikan logic Penjagaan

Version 1.0.12
1. Perbaikan Reject

Version 1.0.11
1. Perbaikan saat bug sumbit

Version 1.0.10
1. Perbaikan Cosmetic

Version 1.0.9
1. Penambahan History
2. Perubahan posisi Button

Version 1.0.8
1. Perubahan Cancel menggunakan Emit

Version 1.0.7
1. Penambahan Result ApvResult, Notes, dan ReasonCode

Version 1.0.6
1. Perbaikan posisi Button

Version 1.0.5
1. Penambahan Button Cancel

Version 1.0.4
1. Penambahan validasi UrlBacktoPaging

Version 1.0.3
1. UiSwitchModule

Version 1.0.2
1. Add InputObj

Version 1.0.1
1. Added ReadMe

## Selector
lib-ucapprovalR3

## Input
1. InputObj : UcInputObj(object) *mandatory

## Output
1. result
2. onCancel
3. resultApvAllowAddApv

## Object property
- TaskId: Task Id
- OfficeCodes : List OfficeCode for filter Next Member
- EnvUrl: Environment Path
- PathUrlGetLevelVoting: API GetLevelVoting
- PathUrlGetPossibleResult: API GetPossibleResult 
- PathUrlSubmitApproval: API SubmitApproval
- PathUrlGetNextNodeMember: API GetNextNodeMember
- PathUrlGetReasonActive: API GetReasonActive
- PathUrlGetChangeFinalLevel: GetChangeFinalLevel
- TrxNo: Transaction No
- UrlBactToPaging: root Paging
- PathUrlGetHistory: API Path GetTaskHitory
- RequestId : Request Id
- PathUrlReturnToLevel : API ReturnToLevel
- PathUrlContinueToLevel : API ContinueToLevel
- EnableRequiredNotes : true/false, Required Notes for Approve (default true)
- requiredNotes: true/false (will override EnableRequiredNotes) (default true)
- notesReqWhen: array of string, list of action when notes need to be required. eg. ["approve", "reject"]
- showApvHistory: true/false, show or hide approval history (default true)
- IsDefaultRejectFinal: true/false (default false), if set to "true", when user choose reject and can reject final, default value for "final" option is set to "true"

## How to use
<lib-ucapprovalR3 [InputObj]="inputObjApv" (result) = "SubmitApproval($event)"></lib-ucapprovalR3>

## Code scaffolding

Run `ng generate component component-name --project ucapprovalR3` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project ucapprovalR3`.
> Note: Don't forget to add `--project ucapprovalR3` or else it will be added to the default project in your `angular.json` file. 

## Build

Run `ng build ucapprovalR3` to build the project. The build artifacts will be stored in the `dist/` directory.

## Publishing

After building your library with `ng build ucapprovalR3`, go to the dist folder `cd dist/ucapproval-r3` and run `npm publish`.

## Running unit tests

Run `ng test ucapprovalR3` to execute the unit tests via [Karma](https://karma-runner.github.io).

## Further help

To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
