verben-authentication-ui 0.3.3 → 0.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/lib/components/button/button.component.mjs +46 -0
- package/esm2022/lib/components/button/button.module.mjs +20 -0
- package/esm2022/lib/components/forgot-password/ForgotPasswordData.mjs +2 -0
- package/esm2022/lib/components/forgot-password/forgot-password.component.mjs +86 -0
- package/esm2022/lib/components/forgot-password/forgot-password.module.mjs +34 -0
- package/esm2022/lib/components/mail/mail.component.mjs +69 -0
- package/esm2022/lib/components/mail/mail.module.mjs +21 -0
- package/esm2022/lib/components/mail-validation/mail-validation.component.mjs +108 -0
- package/esm2022/lib/components/mail-validation/mail-validation.module.mjs +34 -0
- package/esm2022/lib/components/o-auth/o-auth.component.mjs +45 -0
- package/esm2022/lib/components/o-auth/o-auth.module.mjs +19 -0
- package/esm2022/lib/components/otp-input/otp-input.component.mjs +75 -0
- package/esm2022/lib/components/otp-input/otp-input.module.mjs +23 -0
- package/esm2022/lib/components/reset-password/ResetPasswordData.mjs +2 -0
- package/esm2022/lib/components/reset-password/reset-password.component.mjs +107 -0
- package/esm2022/lib/components/reset-password/reset-password.module.mjs +34 -0
- package/esm2022/lib/components/sign-in/sign-in.component.mjs +240 -0
- package/esm2022/lib/components/sign-in/sign-in.module.mjs +24 -0
- package/esm2022/lib/components/sign-up/sign-up.component.mjs +223 -0
- package/esm2022/lib/components/sign-up/sign-up.module.mjs +24 -0
- package/esm2022/lib/components/sso/base-table-style.mjs +53 -0
- package/esm2022/lib/components/sso/helper.mjs +14 -0
- package/esm2022/lib/components/sso/sso-form/sso-form.component.mjs +74 -0
- package/esm2022/lib/components/sso/sso.columns.mjs +29 -0
- package/esm2022/lib/components/sso/sso.component.mjs +236 -0
- package/esm2022/lib/components/sso/sso.module.mjs +63 -0
- package/esm2022/lib/components/two-factor-auth-otp/two-factor-auth-otp.component.mjs +228 -0
- package/esm2022/lib/components/two-factor-auth-otp/two-factor-auth-otp.module.mjs +22 -0
- package/esm2022/lib/components/two-factor-auth-setup/two-factor-auth-setup.component.mjs +90 -0
- package/esm2022/lib/components/two-factor-auth-setup/two-factor-auth-setup.module.mjs +19 -0
- package/esm2022/lib/components/user-management/base-table-style.mjs +53 -0
- package/esm2022/lib/components/user-management/helper.mjs +26 -0
- package/esm2022/lib/components/user-management/useer-management.module.mjs +68 -0
- package/esm2022/lib/components/user-management/user-management-form/use-management-form.component.mjs +57 -0
- package/esm2022/lib/components/user-management/user-management.columns.mjs +43 -0
- package/esm2022/lib/components/user-management/user-management.component.mjs +323 -0
- package/esm2022/lib/components/user-request/user-request.component.mjs +206 -0
- package/esm2022/lib/components/user-request/user-request.module.mjs +34 -0
- package/esm2022/lib/components/user-request-approval/access-request.columns.mjs +24 -0
- package/esm2022/lib/components/user-request-approval/base-table-style.mjs +53 -0
- package/esm2022/lib/components/user-request-approval/facades/user-access-request.facade.mjs +128 -0
- package/esm2022/lib/components/user-request-approval/helper.mjs +35 -0
- package/esm2022/lib/components/user-request-approval/services/user-access-request.service.mjs +72 -0
- package/esm2022/lib/components/user-request-approval/states/user-access-request.state.mjs +59 -0
- package/esm2022/lib/components/user-request-approval/user-access-request-status-badge/user-access-request-status-badge.component.mjs +26 -0
- package/esm2022/lib/components/user-request-approval/user-request-approval.component.mjs +251 -0
- package/esm2022/lib/components/user-request-approval/user-request-approval.module.mjs +77 -0
- package/esm2022/lib/components/user-request-approval/user-request-approval.service.mjs +32 -0
- package/esm2022/lib/components/user-request-approval/user-request-form/use-request-form.component.mjs +64 -0
- package/esm2022/lib/models/ErrorResponse.mjs +11 -0
- package/esm2022/lib/models/PasswordRequestParam.mjs +2 -0
- package/esm2022/lib/models/ResponseKeyValue.mjs +2 -0
- package/esm2022/lib/models/UserRequest.mjs +2 -0
- package/esm2022/lib/models/auth-mechanism.mjs +8 -0
- package/esm2022/lib/models/base.mjs +2 -0
- package/esm2022/lib/models/log-in.mjs +2 -0
- package/esm2022/lib/models/mainUser.mjs +2 -0
- package/esm2022/lib/models/object-state.mjs +8 -0
- package/esm2022/lib/models/otpValue.mjs +2 -0
- package/esm2022/lib/models/paged.mjs +2 -0
- package/esm2022/lib/models/query-params.mjs +2 -0
- package/esm2022/lib/models/request-status.mjs +5 -0
- package/esm2022/lib/models/resend-otp-data.mjs +2 -0
- package/esm2022/lib/models/sign-up.mjs +2 -0
- package/esm2022/lib/models/single-sign-on.mjs +2 -0
- package/esm2022/lib/models/status.mjs +6 -0
- package/esm2022/lib/models/user-access-request-status.mjs +7 -0
- package/esm2022/lib/models/user-access-request.mjs +2 -0
- package/esm2022/lib/models/user.mjs +2 -0
- package/esm2022/lib/services/environment.service.mjs +26 -0
- package/esm2022/lib/services/http-web-request.service.mjs +82 -0
- package/esm2022/lib/services/util.service.mjs +32 -0
- package/esm2022/public-api.mjs +43 -0
- package/esm2022/verben-authentication-ui.mjs +5 -0
- package/fesm2022/verben-authentication-ui.mjs +3622 -0
- package/fesm2022/verben-authentication-ui.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/components/button/button.component.d.ts +17 -0
- package/lib/components/button/button.module.d.ts +10 -0
- package/{src/lib/components/forgot-password/ForgotPasswordData.ts → lib/components/forgot-password/ForgotPasswordData.d.ts} +1 -1
- package/lib/components/forgot-password/forgot-password.component.d.ts +28 -0
- package/lib/components/forgot-password/forgot-password.module.d.ts +10 -0
- package/lib/components/mail/mail.component.d.ts +32 -0
- package/lib/components/mail/mail.module.d.ts +11 -0
- package/lib/components/mail-validation/mail-validation.component.d.ts +42 -0
- package/lib/components/mail-validation/mail-validation.module.d.ts +10 -0
- package/lib/components/o-auth/o-auth.component.d.ts +18 -0
- package/lib/components/o-auth/o-auth.module.d.ts +9 -0
- package/lib/components/otp-input/otp-input.component.d.ts +20 -0
- package/lib/components/otp-input/otp-input.module.d.ts +13 -0
- package/lib/components/reset-password/ResetPasswordData.d.ts +5 -0
- package/lib/components/reset-password/reset-password.component.d.ts +30 -0
- package/lib/components/reset-password/reset-password.module.d.ts +10 -0
- package/lib/components/sign-in/sign-in.component.d.ts +81 -0
- package/lib/components/sign-in/sign-in.module.d.ts +13 -0
- package/lib/components/sign-up/sign-up.component.d.ts +66 -0
- package/lib/components/sign-up/sign-up.module.d.ts +13 -0
- package/lib/components/sso/base-table-style.d.ts +1 -0
- package/lib/components/sso/helper.d.ts +2 -0
- package/lib/components/sso/sso-form/sso-form.component.d.ts +21 -0
- package/lib/components/sso/sso.columns.d.ts +3 -0
- package/lib/components/sso/sso.component.d.ts +54 -0
- package/lib/components/sso/sso.module.d.ts +11 -0
- package/lib/components/two-factor-auth-otp/two-factor-auth-otp.component.d.ts +67 -0
- package/lib/components/two-factor-auth-otp/two-factor-auth-otp.module.d.ts +12 -0
- package/lib/components/two-factor-auth-setup/two-factor-auth-setup.component.d.ts +39 -0
- package/lib/components/two-factor-auth-setup/two-factor-auth-setup.module.d.ts +9 -0
- package/lib/components/user-management/base-table-style.d.ts +1 -0
- package/lib/components/user-management/helper.d.ts +2 -0
- package/lib/components/user-management/useer-management.module.d.ts +11 -0
- package/lib/components/user-management/user-management-form/use-management-form.component.d.ts +20 -0
- package/lib/components/user-management/user-management.columns.d.ts +3 -0
- package/lib/components/user-management/user-management.component.d.ts +60 -0
- package/lib/components/user-request/user-request.component.d.ts +60 -0
- package/lib/components/user-request/user-request.module.d.ts +10 -0
- package/lib/components/user-request-approval/access-request.columns.d.ts +3 -0
- package/lib/components/user-request-approval/base-table-style.d.ts +1 -0
- package/lib/components/user-request-approval/facades/user-access-request.facade.d.ts +23 -0
- package/lib/components/user-request-approval/helper.d.ts +6 -0
- package/lib/components/user-request-approval/services/user-access-request.service.d.ts +50 -0
- package/lib/components/user-request-approval/states/user-access-request.state.d.ts +21 -0
- package/lib/components/user-request-approval/user-access-request-status-badge/user-access-request-status-badge.component.d.ts +12 -0
- package/lib/components/user-request-approval/user-request-approval.component.d.ts +59 -0
- package/lib/components/user-request-approval/user-request-approval.module.d.ts +12 -0
- package/lib/components/user-request-approval/user-request-approval.service.d.ts +18 -0
- package/lib/components/user-request-approval/user-request-form/use-request-form.component.d.ts +21 -0
- package/lib/models/ErrorResponse.d.ts +6 -0
- package/lib/models/PasswordRequestParam.d.ts +5 -0
- package/lib/models/ResponseKeyValue.d.ts +5 -0
- package/lib/models/UserRequest.d.ts +24 -0
- package/lib/models/auth-mechanism.d.ts +13 -0
- package/lib/models/base.d.ts +10 -0
- package/lib/models/log-in.d.ts +7 -0
- package/{src/lib/models/mainUser.ts → lib/models/mainUser.d.ts} +2 -3
- package/lib/models/object-state.d.ts +6 -0
- package/{src/lib/models/otpValue.ts → lib/models/otpValue.d.ts} +1 -3
- package/lib/models/paged.d.ts +9 -0
- package/lib/models/query-params.d.ts +7 -0
- package/lib/models/request-status.d.ts +3 -0
- package/lib/models/resend-otp-data.d.ts +8 -0
- package/lib/models/sign-up.d.ts +9 -0
- package/lib/models/single-sign-on.d.ts +7 -0
- package/lib/models/status.d.ts +4 -0
- package/lib/models/user-access-request-status.d.ts +5 -0
- package/{src/lib/models/user-access-request.ts → lib/models/user-access-request.d.ts} +3 -4
- package/lib/models/user.d.ts +23 -0
- package/lib/services/environment.service.d.ts +16 -0
- package/lib/services/http-web-request.service.d.ts +23 -0
- package/lib/services/util.service.d.ts +8 -0
- package/package.json +14 -8
- package/{src/public-api.ts → public-api.d.ts} +0 -21
- package/ng-package.json +0 -8
- package/src/lib/components/button/button.component.css +0 -3
- package/src/lib/components/button/button.component.html +0 -13
- package/src/lib/components/button/button.component.spec.ts +0 -23
- package/src/lib/components/button/button.component.ts +0 -24
- package/src/lib/components/button/button.module.ts +0 -11
- package/src/lib/components/forgot-password/forgot-password.component.css +0 -29
- package/src/lib/components/forgot-password/forgot-password.component.html +0 -13
- package/src/lib/components/forgot-password/forgot-password.component.spec.ts +0 -23
- package/src/lib/components/forgot-password/forgot-password.component.ts +0 -86
- package/src/lib/components/forgot-password/forgot-password.module.ts +0 -18
- package/src/lib/components/mail/mail.component.css +0 -0
- package/src/lib/components/mail/mail.component.html +0 -11
- package/src/lib/components/mail/mail.component.spec.ts +0 -23
- package/src/lib/components/mail/mail.component.ts +0 -47
- package/src/lib/components/mail/mail.module.ts +0 -13
- package/src/lib/components/mail-validation/mail-validation.component.css +0 -59
- package/src/lib/components/mail-validation/mail-validation.component.html +0 -37
- package/src/lib/components/mail-validation/mail-validation.component.spec.ts +0 -23
- package/src/lib/components/mail-validation/mail-validation.component.ts +0 -66
- package/src/lib/components/mail-validation/mail-validation.module.ts +0 -18
- package/src/lib/components/o-auth/o-auth.component.css +0 -21
- package/src/lib/components/o-auth/o-auth.component.html +0 -60
- package/src/lib/components/o-auth/o-auth.component.spec.ts +0 -23
- package/src/lib/components/o-auth/o-auth.component.ts +0 -43
- package/src/lib/components/o-auth/o-auth.module.ts +0 -11
- package/src/lib/components/otp-input/otp-input.component.css +0 -19
- package/src/lib/components/otp-input/otp-input.component.html +0 -14
- package/src/lib/components/otp-input/otp-input.component.spec.ts +0 -23
- package/src/lib/components/otp-input/otp-input.component.ts +0 -73
- package/src/lib/components/otp-input/otp-input.module.ts +0 -15
- package/src/lib/components/reset-password/ResetPasswordData.ts +0 -5
- package/src/lib/components/reset-password/reset-password.component.css +0 -29
- package/src/lib/components/reset-password/reset-password.component.html +0 -22
- package/src/lib/components/reset-password/reset-password.component.spec.ts +0 -23
- package/src/lib/components/reset-password/reset-password.component.ts +0 -108
- package/src/lib/components/reset-password/reset-password.module.ts +0 -18
- package/src/lib/components/sign-in/sign-in.component.css +0 -21
- package/src/lib/components/sign-in/sign-in.component.html +0 -84
- package/src/lib/components/sign-in/sign-in.component.spec.ts +0 -23
- package/src/lib/components/sign-in/sign-in.component.ts +0 -184
- package/src/lib/components/sign-in/sign-in.module.ts +0 -17
- package/src/lib/components/sign-up/sign-up.component.css +0 -36
- package/src/lib/components/sign-up/sign-up.component.html +0 -132
- package/src/lib/components/sign-up/sign-up.component.spec.ts +0 -23
- package/src/lib/components/sign-up/sign-up.component.ts +0 -176
- package/src/lib/components/sign-up/sign-up.module.ts +0 -15
- package/src/lib/components/sso/base-table-style.ts +0 -52
- package/src/lib/components/sso/helper.ts +0 -15
- package/src/lib/components/sso/sso-form/sso-form.component.css +0 -13
- package/src/lib/components/sso/sso-form/sso-form.component.html +0 -109
- package/src/lib/components/sso/sso-form/sso-form.component.spec.ts +0 -23
- package/src/lib/components/sso/sso-form/sso-form.component.ts +0 -70
- package/src/lib/components/sso/sso.columns.ts +0 -32
- package/src/lib/components/sso/sso.component.css +0 -47
- package/src/lib/components/sso/sso.component.html +0 -208
- package/src/lib/components/sso/sso.component.spec.ts +0 -23
- package/src/lib/components/sso/sso.component.ts +0 -261
- package/src/lib/components/sso/sso.module.ts +0 -40
- package/src/lib/components/two-factor-auth-otp/two-factor-auth-otp.component.css +0 -8
- package/src/lib/components/two-factor-auth-otp/two-factor-auth-otp.component.html +0 -30
- package/src/lib/components/two-factor-auth-otp/two-factor-auth-otp.component.spec.ts +0 -23
- package/src/lib/components/two-factor-auth-otp/two-factor-auth-otp.component.ts +0 -183
- package/src/lib/components/two-factor-auth-otp/two-factor-auth-otp.module.ts +0 -15
- package/src/lib/components/two-factor-auth-setup/two-factor-auth-setup.component.css +0 -17
- package/src/lib/components/two-factor-auth-setup/two-factor-auth-setup.component.html +0 -45
- package/src/lib/components/two-factor-auth-setup/two-factor-auth-setup.component.spec.ts +0 -23
- package/src/lib/components/two-factor-auth-setup/two-factor-auth-setup.component.ts +0 -57
- package/src/lib/components/two-factor-auth-setup/two-factor-auth-setup.module.ts +0 -11
- package/src/lib/components/user-management/base-table-style.ts +0 -52
- package/src/lib/components/user-management/helper.ts +0 -29
- package/src/lib/components/user-management/index.ts +0 -4
- package/src/lib/components/user-management/useer-management.module.ts +0 -48
- package/src/lib/components/user-management/user-management-form/use-management-form.component.ts +0 -61
- package/src/lib/components/user-management/user-management-form/user-management-form.component.css +0 -0
- package/src/lib/components/user-management/user-management-form/user-management-form.component.html +0 -91
- package/src/lib/components/user-management/user-management-form/user-management-form.component.spec.ts +0 -23
- package/src/lib/components/user-management/user-management.columns.ts +0 -45
- package/src/lib/components/user-management/user-management.component.css +0 -26
- package/src/lib/components/user-management/user-management.component.html +0 -275
- package/src/lib/components/user-management/user-management.component.spec.ts +0 -23
- package/src/lib/components/user-management/user-management.component.ts +0 -380
- package/src/lib/components/user-management/user-management.service.ts +0 -42
- package/src/lib/components/user-request/user-request.component.css +0 -91
- package/src/lib/components/user-request/user-request.component.html +0 -165
- package/src/lib/components/user-request/user-request.component.spec.ts +0 -23
- package/src/lib/components/user-request/user-request.component.ts +0 -167
- package/src/lib/components/user-request/user-request.module.ts +0 -18
- package/src/lib/components/user-request-approval/access-request.columns.ts +0 -26
- package/src/lib/components/user-request-approval/base-table-style.ts +0 -52
- package/src/lib/components/user-request-approval/facades/user-access-request.facade.ts +0 -152
- package/src/lib/components/user-request-approval/helper.ts +0 -39
- package/src/lib/components/user-request-approval/services/user-access-request.service.spec.ts +0 -16
- package/src/lib/components/user-request-approval/services/user-access-request.service.ts +0 -87
- package/src/lib/components/user-request-approval/states/user-access-request.state.ts +0 -65
- package/src/lib/components/user-request-approval/user-access-request-status-badge/user-access-request-status-badge.component.css +0 -0
- package/src/lib/components/user-request-approval/user-access-request-status-badge/user-access-request-status-badge.component.html +0 -7
- package/src/lib/components/user-request-approval/user-access-request-status-badge/user-access-request-status-badge.component.spec.ts +0 -23
- package/src/lib/components/user-request-approval/user-access-request-status-badge/user-access-request-status-badge.component.ts +0 -22
- package/src/lib/components/user-request-approval/user-request-approval.component.css +0 -1
- package/src/lib/components/user-request-approval/user-request-approval.component.html +0 -218
- package/src/lib/components/user-request-approval/user-request-approval.component.spec.ts +0 -23
- package/src/lib/components/user-request-approval/user-request-approval.component.ts +0 -301
- package/src/lib/components/user-request-approval/user-request-approval.module.ts +0 -52
- package/src/lib/components/user-request-approval/user-request-approval.service.spec.ts +0 -16
- package/src/lib/components/user-request-approval/user-request-approval.service.ts +0 -58
- package/src/lib/components/user-request-approval/user-request-form/use-request-form.component.ts +0 -66
- package/src/lib/components/user-request-approval/user-request-form/user-request-form.component.css +0 -0
- package/src/lib/components/user-request-approval/user-request-form/user-request-form.component.html +0 -97
- package/src/lib/components/user-request-approval/user-request-form/user-request-form.component.spec.ts +0 -23
- package/src/lib/models/ErrorResponse.ts +0 -7
- package/src/lib/models/PasswordRequestParam.ts +0 -5
- package/src/lib/models/ResponseKeyValue.ts +0 -5
- package/src/lib/models/UserRequest.ts +0 -28
- package/src/lib/models/auth-mechanism.ts +0 -14
- package/src/lib/models/base.ts +0 -11
- package/src/lib/models/log-in.ts +0 -7
- package/src/lib/models/object-state.ts +0 -6
- package/src/lib/models/paged.ts +0 -9
- package/src/lib/models/query-params.ts +0 -7
- package/src/lib/models/request-status.ts +0 -4
- package/src/lib/models/resend-otp-data.ts +0 -8
- package/src/lib/models/resource.ts +0 -27
- package/src/lib/models/sign-up.ts +0 -11
- package/src/lib/models/single-sign-on.ts +0 -9
- package/src/lib/models/status.ts +0 -5
- package/src/lib/models/user-access-request-status.ts +0 -5
- package/src/lib/models/user.ts +0 -24
- package/src/lib/services/environment.service.spec.ts +0 -16
- package/src/lib/services/environment.service.ts +0 -23
- package/src/lib/services/http-web-request.service.spec.ts +0 -16
- package/src/lib/services/http-web-request.service.ts +0 -101
- package/src/lib/services/util.service.spec.ts +0 -16
- package/src/lib/services/util.service.ts +0 -28
- package/src/styles.css +0 -96
- package/src/theme/tailwind-setup.css +0 -3
- package/src/theme/tailwind.css +0 -980
- package/tailwind.config.js +0 -20
- package/tsconfig.lib.json +0 -15
- package/tsconfig.lib.prod.json +0 -11
- package/tsconfig.spec.json +0 -15
package/src/lib/components/user-request-approval/user-request-form/use-request-form.component.ts
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|
2
|
-
import { FormBuilder, FormGroup } from '@angular/forms';
|
|
3
|
-
import { CardData } from 'verben-ng-ui';
|
|
4
|
-
|
|
5
|
-
interface UserFormData {
|
|
6
|
-
MailAddress: string;
|
|
7
|
-
Name: string;
|
|
8
|
-
PhoneNumber: string;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
@Component({
|
|
12
|
-
selector: 'lib-user-request-form',
|
|
13
|
-
templateUrl: './user-request-form.component.html',
|
|
14
|
-
styleUrl: './user-request-form.component.css',
|
|
15
|
-
})
|
|
16
|
-
export class UserRequestFormComponent {
|
|
17
|
-
@Input() set currentData(value: CardData | null) {
|
|
18
|
-
if (value?.data) {
|
|
19
|
-
this.form.patchValue({
|
|
20
|
-
MailAddress: value.data.MailAddress || '',
|
|
21
|
-
FirstName: value.data.FirstName || '',
|
|
22
|
-
LastName: value.data.LastName || '',
|
|
23
|
-
OtherName: value.data.OtherName || '',
|
|
24
|
-
PhoneNumber: value.data.PhoneNumber || '',
|
|
25
|
-
});
|
|
26
|
-
} else {
|
|
27
|
-
this.form.reset();
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
@Output() switchView = new EventEmitter<undefined>();
|
|
32
|
-
@Output() onApproval = new EventEmitter<string>();
|
|
33
|
-
|
|
34
|
-
form: FormGroup;
|
|
35
|
-
|
|
36
|
-
roles: { id: string; name: string }[] = [
|
|
37
|
-
{ id: 'admin', name: 'Admin' },
|
|
38
|
-
{ id: 'manager', name: 'Manager' },
|
|
39
|
-
{ id: 'staff', name: 'Staff' },
|
|
40
|
-
];
|
|
41
|
-
|
|
42
|
-
constructor(private fb: FormBuilder) {
|
|
43
|
-
this.form = this.fb.group({
|
|
44
|
-
MailAddress: ['', { readonly: true }],
|
|
45
|
-
FirstName: ['', { readonly: true }],
|
|
46
|
-
LastName: ['', { readonly: true }],
|
|
47
|
-
OtherName: ['', { readonly: true }],
|
|
48
|
-
PhoneNumber: ['', { readonly: true }],
|
|
49
|
-
RoleId: [''],
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
ngOnInit(): void {}
|
|
54
|
-
|
|
55
|
-
onSave(): void {
|
|
56
|
-
if (this.form.valid) {
|
|
57
|
-
// Emit save event with form value
|
|
58
|
-
console.log('Form saved:', this.form.value);
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
onDelete(): void {
|
|
63
|
-
// Emit delete event
|
|
64
|
-
console.log('Delete requested');
|
|
65
|
-
}
|
|
66
|
-
}
|
package/src/lib/components/user-request-approval/user-request-form/user-request-form.component.css
DELETED
|
File without changes
|
package/src/lib/components/user-request-approval/user-request-form/user-request-form.component.html
DELETED
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
<form
|
|
2
|
-
[formGroup]="form"
|
|
3
|
-
class="flex flex-col px-3 pb-3 rounded-xl h-full w-full relative space-y-4"
|
|
4
|
-
>
|
|
5
|
-
<verbena-input
|
|
6
|
-
name="MailAddress"
|
|
7
|
-
label="Mail Address:"
|
|
8
|
-
formControlName="MailAddress"
|
|
9
|
-
/>
|
|
10
|
-
<verbena-input
|
|
11
|
-
label="First Name:"
|
|
12
|
-
name="FirstName"
|
|
13
|
-
type="text"
|
|
14
|
-
formControlName="FirstName"
|
|
15
|
-
/>
|
|
16
|
-
<verbena-input
|
|
17
|
-
label="Last Name:"
|
|
18
|
-
name="LastName"
|
|
19
|
-
type="text"
|
|
20
|
-
formControlName="LastName"
|
|
21
|
-
/>
|
|
22
|
-
<verbena-input
|
|
23
|
-
label="OtherName:"
|
|
24
|
-
name="OtherName"
|
|
25
|
-
type="text"
|
|
26
|
-
formControlName="OtherName"
|
|
27
|
-
/>
|
|
28
|
-
<verbena-input
|
|
29
|
-
label="Phone Number:"
|
|
30
|
-
name="PhoneNumber"
|
|
31
|
-
type="tel"
|
|
32
|
-
formControlName="PhoneNumber"
|
|
33
|
-
/>
|
|
34
|
-
|
|
35
|
-
<div class="space-y-1">
|
|
36
|
-
<label for="role">Role</label>
|
|
37
|
-
|
|
38
|
-
<verben-drop-down
|
|
39
|
-
label="Role"
|
|
40
|
-
styleClass="w-full"
|
|
41
|
-
width="100%"
|
|
42
|
-
[multiselect]="false"
|
|
43
|
-
[filter]="true"
|
|
44
|
-
[showClear]="true"
|
|
45
|
-
placeholder=""
|
|
46
|
-
[(options)]="roles"
|
|
47
|
-
id="role"
|
|
48
|
-
optionLabel="name"
|
|
49
|
-
optionValue="id"
|
|
50
|
-
formControlName="RoleId"
|
|
51
|
-
class="form-control"
|
|
52
|
-
>
|
|
53
|
-
</verben-drop-down>
|
|
54
|
-
</div>
|
|
55
|
-
|
|
56
|
-
<!-- buttons -->
|
|
57
|
-
<div class="flex justify-between bottom-8 left-0 right-0 px-3 pb-2">
|
|
58
|
-
<!-- <verbena-button
|
|
59
|
-
text="Delete"
|
|
60
|
-
class="bg-secondary-200 text-[black]"
|
|
61
|
-
(click)="onDelete()"
|
|
62
|
-
/>
|
|
63
|
-
<verbena-button
|
|
64
|
-
text="Save"
|
|
65
|
-
class="bg-primary text-[black]"
|
|
66
|
-
(click)="onSave()"
|
|
67
|
-
/>
|
|
68
|
-
|
|
69
|
-
<verbena-button
|
|
70
|
-
text="Secondary Button"
|
|
71
|
-
styleType="secondary"
|
|
72
|
-
></verbena-button> -->
|
|
73
|
-
<verbena-button
|
|
74
|
-
width="114px"
|
|
75
|
-
height="39px"
|
|
76
|
-
text="Reject"
|
|
77
|
-
styleType="danger"
|
|
78
|
-
borderRadius="10px"
|
|
79
|
-
></verbena-button>
|
|
80
|
-
<verbena-button
|
|
81
|
-
(click)="switchView.emit()"
|
|
82
|
-
text="Switch To Table"
|
|
83
|
-
styleType="ylw-outline"
|
|
84
|
-
></verbena-button>
|
|
85
|
-
<verbena-button
|
|
86
|
-
(click)="onApproval.emit(form.get('MailAddress')?.value)"
|
|
87
|
-
text="Approve"
|
|
88
|
-
bgColor="#28a745"
|
|
89
|
-
textColor="white"
|
|
90
|
-
border="1px solid #28a745"
|
|
91
|
-
borderRadius="10px"
|
|
92
|
-
pd="10px 20px"
|
|
93
|
-
width="114px"
|
|
94
|
-
height="39px"
|
|
95
|
-
></verbena-button>
|
|
96
|
-
</div>
|
|
97
|
-
</form>
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { UserRequestFormComponent } from './use-request-form.component';
|
|
4
|
-
|
|
5
|
-
describe('UserRequestFormComponent', () => {
|
|
6
|
-
let component: UserRequestFormComponent;
|
|
7
|
-
let fixture: ComponentFixture<UserRequestFormComponent>;
|
|
8
|
-
|
|
9
|
-
beforeEach(async () => {
|
|
10
|
-
await TestBed.configureTestingModule({
|
|
11
|
-
imports: [UserRequestFormComponent]
|
|
12
|
-
})
|
|
13
|
-
.compileComponents();
|
|
14
|
-
|
|
15
|
-
fixture = TestBed.createComponent(UserRequestFormComponent);
|
|
16
|
-
component = fixture.componentInstance;
|
|
17
|
-
fixture.detectChanges();
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
it('should create', () => {
|
|
21
|
-
expect(component).toBeTruthy();
|
|
22
|
-
});
|
|
23
|
-
});
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { ObjectState } from "./object-state";
|
|
2
|
-
import { RequestStatus } from "./request-status";
|
|
3
|
-
import { Status } from "./status";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export interface UserRequestPayload {
|
|
8
|
-
Code:string;
|
|
9
|
-
FirstName:string;
|
|
10
|
-
LastName:string;
|
|
11
|
-
MailAddress:string;
|
|
12
|
-
Password:string;
|
|
13
|
-
PhoneNumber:string;
|
|
14
|
-
OtherName:string;
|
|
15
|
-
Role: string[];
|
|
16
|
-
Tags: [];
|
|
17
|
-
Status: Status;
|
|
18
|
-
UpdatedAt: Date;
|
|
19
|
-
CreatedAt: Date;
|
|
20
|
-
Id:string;
|
|
21
|
-
DataState: ObjectState;
|
|
22
|
-
TenantId: string;
|
|
23
|
-
ServiceName:string;
|
|
24
|
-
ActionBy:string;
|
|
25
|
-
RequestStatus:RequestStatus
|
|
26
|
-
Comment:string;
|
|
27
|
-
}
|
|
28
|
-
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export enum MechanismType {
|
|
2
|
-
InApp = 'InApp',
|
|
3
|
-
Google = 'Google',
|
|
4
|
-
Apple = 'Apple',
|
|
5
|
-
MicrosoftAD = 'MicrosoftAD',
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export interface AuthMechanism {
|
|
9
|
-
AuthMechanism: string;
|
|
10
|
-
ClientId: string;
|
|
11
|
-
ClientSecret: string;
|
|
12
|
-
RedirectUri: string;
|
|
13
|
-
Scope: string;
|
|
14
|
-
}
|
package/src/lib/models/base.ts
DELETED
package/src/lib/models/log-in.ts
DELETED
package/src/lib/models/paged.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { BaseModel } from './base';
|
|
2
|
-
import { ObjectState } from './object-state';
|
|
3
|
-
|
|
4
|
-
export abstract class ResourceModel<T extends BaseModel> implements BaseModel {
|
|
5
|
-
public Id: string;
|
|
6
|
-
public CreatedAt: Date;
|
|
7
|
-
public UpdatedAt: Date;
|
|
8
|
-
public State: ObjectState;
|
|
9
|
-
public Tenant: string;
|
|
10
|
-
public id: string | number;
|
|
11
|
-
|
|
12
|
-
constructor(model?: Partial<T>) {
|
|
13
|
-
if (model) {
|
|
14
|
-
Object.assign(this, model);
|
|
15
|
-
}
|
|
16
|
-
this.Id = model?.Id || '';
|
|
17
|
-
this.CreatedAt = model?.CreatedAt ? new Date(model.CreatedAt) : new Date();
|
|
18
|
-
this.UpdatedAt = model?.UpdatedAt ? new Date(model.UpdatedAt) : new Date();
|
|
19
|
-
this.State = model?.State ?? ObjectState.New;
|
|
20
|
-
this.Tenant = model?.Tenant ?? '';
|
|
21
|
-
this.id = model?.Id ?? Math.random();
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
public toJson(): any {
|
|
25
|
-
return JSON.parse(JSON.stringify(this));
|
|
26
|
-
}
|
|
27
|
-
}
|
package/src/lib/models/status.ts
DELETED
package/src/lib/models/user.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { BaseModel } from './base';
|
|
2
|
-
|
|
3
|
-
export interface User extends BaseModel {
|
|
4
|
-
Password: string;
|
|
5
|
-
OldPassword?: string;
|
|
6
|
-
PhoneNumber?: string;
|
|
7
|
-
FirstName: string;
|
|
8
|
-
LastName: string;
|
|
9
|
-
OtherName?: string;
|
|
10
|
-
MailAddress: string;
|
|
11
|
-
Token?: string;
|
|
12
|
-
ExpireOn: Date;
|
|
13
|
-
IsSeeded: boolean;
|
|
14
|
-
RoleID?: string;
|
|
15
|
-
OTP?: string;
|
|
16
|
-
Department?: string;
|
|
17
|
-
Faculty?: string;
|
|
18
|
-
OTPExpireOn: Date;
|
|
19
|
-
Tenants: string[];
|
|
20
|
-
DepartmentName?: string;
|
|
21
|
-
Address?: string;
|
|
22
|
-
Role?: string[];
|
|
23
|
-
Status?: string;
|
|
24
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { EnvironmentService } from './environment.service';
|
|
4
|
-
|
|
5
|
-
describe('EnvironmentService', () => {
|
|
6
|
-
let service: EnvironmentService;
|
|
7
|
-
|
|
8
|
-
beforeEach(() => {
|
|
9
|
-
TestBed.configureTestingModule({});
|
|
10
|
-
service = TestBed.inject(EnvironmentService);
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
it('should be created', () => {
|
|
14
|
-
expect(service).toBeTruthy();
|
|
15
|
-
});
|
|
16
|
-
});
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
// In your library's services/environment.service.ts
|
|
2
|
-
import { Injectable, InjectionToken, Inject } from '@angular/core';
|
|
3
|
-
// import { ENVIRONMENT } from '../models/ENVIRONMENT_TOKEN';
|
|
4
|
-
|
|
5
|
-
export const ENVIRONMENT = new InjectionToken<Environment>('environment');
|
|
6
|
-
|
|
7
|
-
export interface Environment {
|
|
8
|
-
production: boolean;
|
|
9
|
-
AuthenticationAPI: string;
|
|
10
|
-
APIKey:string,
|
|
11
|
-
Secret:string,
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
@Injectable({
|
|
15
|
-
providedIn: 'root',
|
|
16
|
-
})
|
|
17
|
-
export class EnvironmentService {
|
|
18
|
-
constructor(@Inject(ENVIRONMENT) private env: Environment) {}
|
|
19
|
-
|
|
20
|
-
get environment(): Environment {
|
|
21
|
-
return this.env;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { HttpWebRequestService } from './http-web-request.service';
|
|
4
|
-
|
|
5
|
-
describe('HttpWebRequestService', () => {
|
|
6
|
-
let service: HttpWebRequestService;
|
|
7
|
-
|
|
8
|
-
beforeEach(() => {
|
|
9
|
-
TestBed.configureTestingModule({});
|
|
10
|
-
service = TestBed.inject(HttpWebRequestService);
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
it('should be created', () => {
|
|
14
|
-
expect(service).toBeTruthy();
|
|
15
|
-
});
|
|
16
|
-
});
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import { HttpClient } from '@angular/common/http';
|
|
2
|
-
import { Injectable } from '@angular/core';
|
|
3
|
-
import { Observable } from 'rxjs';
|
|
4
|
-
import { ErrorResponse } from '../models/ErrorResponse';
|
|
5
|
-
import { EnvironmentService } from './environment.service';
|
|
6
|
-
import { NotificationService } from 'verben-ng-ui';
|
|
7
|
-
|
|
8
|
-
@Injectable({
|
|
9
|
-
providedIn: 'root',
|
|
10
|
-
})
|
|
11
|
-
export class HttpWebRequestService {
|
|
12
|
-
isProd: boolean;
|
|
13
|
-
|
|
14
|
-
constructor(
|
|
15
|
-
private http: HttpClient,
|
|
16
|
-
private envSvc: EnvironmentService,
|
|
17
|
-
private notificationService: NotificationService
|
|
18
|
-
) {
|
|
19
|
-
this.isProd = this.envSvc.environment.production;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
private buildHeaders(){
|
|
23
|
-
return {
|
|
24
|
-
'Content-Type': 'application/json',
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
private buildUrl(url: string, baseUrl: string): string {
|
|
29
|
-
return `${baseUrl}/${url}`;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
private handleError(err: any): ErrorResponse {
|
|
33
|
-
|
|
34
|
-
const msg =
|
|
35
|
-
err.error?.ErrorMsg ||
|
|
36
|
-
(err.error?.errors?.values as string[])?.toString() ||
|
|
37
|
-
`${err.status} ${err.statusText}`;
|
|
38
|
-
|
|
39
|
-
this.notificationService.error(msg, { timeout: 3000 });
|
|
40
|
-
return new ErrorResponse(msg);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
private request<T>(
|
|
44
|
-
method: 'GET' | 'POST' | 'PUT' | 'DELETE',
|
|
45
|
-
url: string,
|
|
46
|
-
body?: any,
|
|
47
|
-
baseUrl: string = this.envSvc.environment.AuthenticationAPI,
|
|
48
|
-
): Promise<T> | Observable<T> {
|
|
49
|
-
const options = {
|
|
50
|
-
headers: this.buildHeaders(),
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
const requestUrl = this.buildUrl(url, baseUrl);
|
|
54
|
-
|
|
55
|
-
switch (method) {
|
|
56
|
-
case 'GET':
|
|
57
|
-
return new Promise((resolve) =>
|
|
58
|
-
this.http.get<T>(requestUrl, options).subscribe({
|
|
59
|
-
next: resolve,
|
|
60
|
-
error: (err) => resolve(this.handleError(err) as T),
|
|
61
|
-
})
|
|
62
|
-
);
|
|
63
|
-
case 'POST':
|
|
64
|
-
return new Promise((resolve) =>
|
|
65
|
-
this.http.post<T>(requestUrl, body, options).subscribe({
|
|
66
|
-
next: resolve,
|
|
67
|
-
error: (err) => resolve(this.handleError(err) as T),
|
|
68
|
-
})
|
|
69
|
-
);
|
|
70
|
-
case 'PUT':
|
|
71
|
-
return this.http.put<T>(requestUrl, body, options);
|
|
72
|
-
case 'DELETE':
|
|
73
|
-
return this.http.delete<T>(requestUrl, options);
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
get<T>(url: string, baseUrl?: string): Promise<T> {
|
|
78
|
-
return this.request('GET', url, undefined, baseUrl) as Promise<T>;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
post<T>(url: string, body: any, baseUrl?: string): Promise<T> {
|
|
82
|
-
return this.request('POST', url, JSON.stringify(body), baseUrl) as Promise<T>;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
postFile<T>(url: string, formData: FormData, baseUrl?: string): Promise<T> {
|
|
86
|
-
return new Promise((resolve) =>
|
|
87
|
-
this.http.post<T>(this.buildUrl(url, baseUrl || this.envSvc.environment.AuthenticationAPI), formData).subscribe({
|
|
88
|
-
next: resolve,
|
|
89
|
-
error: (err) => resolve(this.handleError(err) as T),
|
|
90
|
-
})
|
|
91
|
-
);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
put<T>(url: string, body: any, baseUrl?: string): Observable<T> {
|
|
95
|
-
return this.request('PUT', url, body, baseUrl) as Observable<T>;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
delete<T>(url: string, baseUrl?: string): Observable<T> {
|
|
99
|
-
return this.request('DELETE', url, undefined, baseUrl) as Observable<T>;
|
|
100
|
-
}
|
|
101
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { UtilService } from './util.service';
|
|
4
|
-
|
|
5
|
-
describe('UtilService', () => {
|
|
6
|
-
let service: UtilService;
|
|
7
|
-
|
|
8
|
-
beforeEach(() => {
|
|
9
|
-
TestBed.configureTestingModule({});
|
|
10
|
-
service = TestBed.inject(UtilService);
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
it('should be created', () => {
|
|
14
|
-
expect(service).toBeTruthy();
|
|
15
|
-
});
|
|
16
|
-
});
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Inject,
|
|
3
|
-
Injectable,
|
|
4
|
-
InjectionToken,
|
|
5
|
-
Optional,
|
|
6
|
-
SkipSelf,
|
|
7
|
-
} from '@angular/core';
|
|
8
|
-
import { UTIL_SERVICE } from 'verben-ng-ui';
|
|
9
|
-
|
|
10
|
-
@Injectable({
|
|
11
|
-
providedIn: 'root',
|
|
12
|
-
})
|
|
13
|
-
export class UtilService {
|
|
14
|
-
constructor(
|
|
15
|
-
@Optional()
|
|
16
|
-
@Inject(UTIL_SERVICE)
|
|
17
|
-
private parentUtilService: any
|
|
18
|
-
) {}
|
|
19
|
-
|
|
20
|
-
sendBI(state: boolean): void {
|
|
21
|
-
console.log({ Service: this.parentUtilService });
|
|
22
|
-
if (this.parentUtilService && this.parentUtilService.sendBI) {
|
|
23
|
-
this.parentUtilService.sendBI(state);
|
|
24
|
-
} else {
|
|
25
|
-
console.warn('Util Service is not provided');
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
}
|