Advertisement
Guest User

Angular - SignUp Flux

a guest
Jul 16th, 2019
304
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.46 KB | None | 0 0
  1. <!-- <app-header class="nav-header" [backButton]="true" styles="background: white !important;">
  2. </app-header>
  3.  
  4.  
  5. <div class="signup-content">
  6. <mat-vertical-stepper [linear]="true" #stepper>
  7. <mat-step [stepControl]="accessForm" [editable]='(accountCreated | async)?.id == null'>
  8. <ng-template matStepLabel>Acesso</ng-template>
  9. <mat-accordion class="example-headers-align">
  10. <form [formGroup]="accessForm" id='accssForm' (ngSubmit)="saveAccess()">
  11. <mat-expansion-panel [expanded]="signupStep === 0" (opened)="signupStep = 0" hideToggle="true">
  12. <mat-expansion-panel-header>
  13. <mat-panel-title>
  14. Conta
  15. </mat-panel-title>
  16. <mat-panel-description>
  17. <mat-icon>account_circle</mat-icon>
  18. </mat-panel-description>
  19. </mat-expansion-panel-header>
  20.  
  21. <div class="container-input-personal">
  22. <mat-form-field appearance="outline">
  23. <mat-label>Apelido da conta</mat-label>
  24. <input matInput formControlName="name" required minlength="2" maxlength="100">
  25. </mat-form-field>
  26.  
  27. <mat-form-field appearance="outline">
  28. <mat-label>Email da conta</mat-label>
  29. <input matInput formControlName="email" type="email" email minlength="5" maxlength="256" required>
  30. </mat-form-field>
  31.  
  32. <mat-form-field appearance="outline" formGroupName="phone">
  33. <mat-label>Telefone</mat-label>
  34. <input matInput formControlName="number" mask="(00) 00000-0000" required>
  35. </mat-form-field>
  36. </div>
  37. <mat-action-row>
  38. <button mat-button color="primary" type="button" (click)="signupStep = signupStep + 1">Próximo</button>
  39. </mat-action-row>
  40. </mat-expansion-panel>
  41.  
  42. <mat-expansion-panel [expanded]="signupStep === 1" (opened)="signupStep = 1" hideToggle="true">
  43. <mat-expansion-panel-header>
  44. <mat-panel-title>
  45. Acesso
  46. </mat-panel-title>
  47. <mat-panel-description>
  48. <mat-icon>lock</mat-icon>
  49. </mat-panel-description>
  50. </mat-expansion-panel-header>
  51.  
  52. <div class="container-input" formGroupName="login">
  53. <mat-form-field appearance="outline">
  54. <mat-label>Nome completo</mat-label>
  55. <input matInput formControlName="name" required minlength="2" maxlength="100">
  56. </mat-form-field>
  57.  
  58. <mat-form-field appearance="outline">
  59. <mat-label>Senha</mat-label>
  60. <input matInput type="password" autocomplete="off" formControlName="password" required minlength="8"
  61. pattern="^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$">
  62. <button type="button" class='tooltip-icon' mat-icon-button matSuffix
  63. matTooltip="A senha deve conter pelo menos oito caracteres, pelo menos uma letra maiúscula, uma letra minúscula, um número e um caractere especial"
  64. [matTooltipPosition]="position.value" matTooltipClass="example-tooltip-red">
  65. <mat-icon>info</mat-icon>
  66. </button>
  67. </mat-form-field>
  68.  
  69. <mat-form-field appearance="outline">
  70. <mat-label>Confirmar Senha</mat-label>
  71. <input matInput type="password" autocomplete="off" formControlName="repassword" required minlength="8"
  72. pattern="^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$">
  73. <mat-error
  74. *ngIf="accessForm.get('login.repassword').touched && accessForm.get('login.repassword').hasError('notSame')">
  75. Senhas não conferem
  76. </mat-error>
  77. </mat-form-field>
  78. </div>
  79. <mat-action-row>
  80. <button mat-button color="warn" type="button" (click)="signupStep = signupStep - 1">Voltar</button>
  81. </mat-action-row>
  82. </mat-expansion-panel>
  83. </form>
  84. </mat-accordion>
  85. <button class="btn-next" mat-stroked-button color="primary" type='submit' form='accssForm'>
  86. Pagamento
  87. </button>
  88. </mat-step> -->
  89.  
  90. <!-- Payment -->
  91. <!-- <mat-step [stepControl]="creditCardForm" [editable]='(accountCreated | async)?.id == null'>
  92. <ng-template matStepLabel>Pagamento</ng-template>
  93. <mat-accordion class="example-headers-align">
  94. <form id='ccForm' #ccForm [formGroup]="creditCardForm" (ngSubmit)="saveSignup(ccForm)">
  95. <mat-expansion-panel [expanded]="paymentStep === 0" (opened)="paymentStep = 0" hideToggle="true">
  96. <mat-expansion-panel-header>
  97. <mat-panel-title>
  98. Pagamento
  99. </mat-panel-title>
  100. <mat-panel-description>
  101. <mat-icon>credit_card</mat-icon>
  102. </mat-panel-description>
  103. </mat-expansion-panel-header>
  104.  
  105. <div class="container-input-payment">
  106. <mat-form-field appearance="outline">
  107. <mat-label>Titular do cartão</mat-label>
  108. <input matInput formControlName='full_name' data-iugu="full_name" required autocomplete="off">
  109. </mat-form-field>
  110.  
  111. <div class="container-document">
  112. <mat-form-field formGroupName="document" id="select-document-type" appearance="outline">
  113. <mat-label>Tipo documento</mat-label>
  114. <mat-select formControlName="type" (selectionChange)="setDocumentType($event.value)" required>
  115. <mat-option *ngFor="let docType of documentType" [value]="docType.value">
  116. {{docType.viewValue}}
  117. </mat-option>
  118. </mat-select>
  119. </mat-form-field>
  120.  
  121. <mat-form-field formGroupName="document" id="select-document-number" appearance="outline">
  122. <mat-label>Número</mat-label>
  123. <input matInput formControlName="number" [mask]="documentMask" required>
  124. </mat-form-field>
  125. </div>
  126.  
  127. <mat-form-field appearance="outline">
  128. <mat-label>Número do cartão</mat-label>
  129. <input matInput formControlName='number' mask='0000 0000 0000 0000' placeholder='0000 0000 0000 0000'
  130. data-iugu="number" required autocomplete="off" #cardNumber>
  131. <img id='card-brand' *ngIf='getCardBrand(cardNumber.value) != false'
  132. [src]="getCardBrand(cardNumber.value)" />
  133. </mat-form-field>
  134.  
  135. <div id="container-cvv-expiration">
  136. <mat-form-field appearance="outline">
  137. <mat-label>CVV</mat-label>
  138. <input matInput formControlName='verification_value' mask='000' placeholder='000' maxlength="3"
  139. minlength="3" data-iugu="verification_value" required autocomplete="off">
  140. </mat-form-field>
  141.  
  142. <mat-form-field appearance="outline">
  143. <mat-label>Data de vencimento</mat-label>
  144. <input matInput formControlName='expiration' data-iugu="expiration" maxlength="5" minlength="5"
  145. [dropSpecialCharacters]="false" mask='00/00' required autocomplete="off" placeholder="MM/AA">
  146. </mat-form-field>
  147. </div>
  148. </div>
  149. <mat-action-row>
  150. <button mat-button color="primary" type="button" (click)="paymentStep = paymentStep + 1">Próximo</button>
  151. </mat-action-row>
  152. </mat-expansion-panel>
  153.  
  154.  
  155. <mat-expansion-panel [expanded]="paymentStep === 1" (opened)="paymentStep = 1" hideToggle="true">
  156. <mat-expansion-panel-header>
  157. <mat-panel-title>Endereço</mat-panel-title>
  158. <mat-panel-description>
  159. <mat-icon>map</mat-icon>
  160. </mat-panel-description>
  161. </mat-expansion-panel-header>
  162. <div class="container-input-address" formGroupName="address">
  163. <mat-form-field appearance="outline">
  164. <mat-label>CEP</mat-label>
  165. <input matInput formControlName='zipCode' mask='00000-000' (ngModelChange)='getCEP(cep.value)'
  166. debounce='1000' required #cep>
  167. </mat-form-field>
  168.  
  169. <mat-form-field appearance="outline">
  170. <mat-label>País</mat-label>
  171. <input matInput formControlName='country' required minlength="2" maxlength="150">
  172. </mat-form-field>
  173.  
  174. <mat-form-field appearance="outline">
  175. <mat-label>Cidade</mat-label>
  176. <input matInput formControlName='city' required minlength="2" maxlength="150">
  177. </mat-form-field>
  178.  
  179. <mat-form-field appearance="outline">
  180. <mat-label>Bairro</mat-label>
  181. <input matInput formControlName='district' required minlength="2" maxlength="150">
  182. </mat-form-field>
  183.  
  184. <mat-form-field appearance="outline">
  185. <mat-label>Estado</mat-label>
  186. <input matInput formControlName='state' required minlength="2" maxlength="150">
  187. </mat-form-field>
  188.  
  189. <mat-form-field appearance="outline">
  190. <mat-label>Logradouro</mat-label>
  191. <input matInput formControlName='streetName' required minlength="2" maxlength="150"
  192. [value]='(address$ | async)?.logradouro'>
  193. </mat-form-field>
  194.  
  195. <mat-form-field appearance="outline">
  196. <mat-label>Número</mat-label>
  197. <input matInput type="number" formControlName='streetNumber' required minlength="0" maxlength="6"
  198. pattern="^[0-9]*$">
  199. </mat-form-field>
  200.  
  201. <mat-form-field appearance="outline">
  202. <mat-label>Complemento</mat-label>
  203. <input matInput formControlName='complement' placeholder="Complemento" maxlength="256">
  204. </mat-form-field>
  205. </div>
  206. <mat-action-row>
  207. <button mat-button color="warn" type="button" (click)="paymentStep = paymentStep - 1">Voltar</button>
  208. </mat-action-row>
  209. </mat-expansion-panel>
  210. </form>
  211. </mat-accordion>
  212. <button class="btn-next" mat-stroked-button color="primary" type="submit" form="ccForm">
  213. Finalização
  214. </button>
  215. </mat-step> -->
  216. <!-- /Payment -->
  217.  
  218. <!-- <mat-step>
  219. <ng-template matStepLabel matStepperIcon="done">Finalização</ng-template>
  220. <mat-card class="finish-card" *ngIf='(accountCreated | async)?.id == null'>
  221. <mat-progress-bar mode="indeterminate" color='accent' *ngIf='loading$ | async'></mat-progress-bar>
  222. <mat-card-header>
  223. <mat-card-title>Finalização</mat-card-title>
  224. </mat-card-header>
  225. <div class=container-icon>
  226. <mat-icon>check_circle_outline</mat-icon>
  227. </div>
  228. <mat-card-content id='finish-card-content'>
  229. <h2>Falta pouco!</h2>
  230. <p>
  231. Clique em 'Criar conta' para finalizar seu cadastro.
  232. </p>
  233. <div id=''>
  234. <mat-checkbox [(ngModel)]="statusTerms">
  235. Aceito os <a [href]='termsLink' target="_blank">termos de uso</a> e o <a [href]='agreementLink'
  236. target="_blank">contrato de
  237. serviço</a>
  238. </mat-checkbox>
  239. </div>
  240. </mat-card-content>
  241. <mat-card-actions>
  242. <div class=container-btn-finish>
  243. <button id='btn-finish-create-account' mat-flat-button color="primary" (click)="createAccount()"
  244. [disabled]="(loading$ | async) || !statusTerms">Criar
  245. conta</button>
  246. <button id='btn-finish-back' mat-stroked-button color="warn" matStepperPrevious
  247. [disabled]="(loading$ | async)">Voltar</button>
  248. </div>
  249. </mat-card-actions>
  250. </mat-card>
  251.  
  252. <mat-card class="finish-card" *ngIf='(accountCreated | async)?.id != null'>
  253. <mat-card-header>
  254. <mat-card-title>Finalização</mat-card-title>
  255. </mat-card-header>
  256. <div class=container-icon-created>
  257. <mat-icon>check_circle_outline</mat-icon>
  258. </div>
  259. <mat-card-content id='success-card-content'>
  260. <h2>Bem vindo! Sua conta foi criada com sucesso.</h2>
  261. <div id='success-info'>
  262. <p>
  263. Um email com um link de confirmação da criação da sua conta foi enviado para você.
  264. Após confirmá-lo, você já pode usar sua conta.
  265. </p>
  266. <p>
  267. <strong>
  268. Atenção: Guarde as credenciais de acesso fornecidas no final dessa página.
  269. Você precisará para realizar login no KIOSK.
  270. </strong>
  271. </p>
  272. </div>
  273. </mat-card-content>
  274. <mat-card-actions>
  275. <div class=container-btn-finish>
  276. <button mat-stroked-button color="primary" (click)="showAccountDetails()">Ver dados de acesso do
  277. Kiosk</button>
  278. </div>
  279. </mat-card-actions>
  280. </mat-card>
  281. </mat-step>
  282. <ng-template matStepperIcon="edit">
  283. <mat-icon>done</mat-icon>
  284. </ng-template>
  285. </mat-vertical-stepper>
  286. </div> -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement