This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am jeanpaulll on github. | |
* I am jeanpaull (https://keybase.io/jeanpaull) on keybase. | |
* I have a public key ASBwwexVsB-3HL68HEGTB8ASO4-0cYdIDqF2iISO-pkQNAo | |
To claim this, I am signing this object: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {AbstractControl} from '@angular/forms'; | |
import * as Moment from 'moment'; | |
import {UtilData} from '../util/util-data'; | |
/** | |
* @author Jean Paul - <jeanpaulwebb@gmail.com> | |
* @class Validacao | |
* @description Validações | |
* @date 16/06/2021 | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core'; | |
import {FormArray, FormBuilder, FormGroup} from '@angular/forms'; | |
import {environment} from '../../../../environments/environment'; | |
import {MessageBox} from '../../models/util/message-box'; | |
import {UtilForm} from '../../models/util/util-form'; | |
import {FormatForm} from './format-form'; | |
const noop = () => { | |
}; | |
declare var toastr: any; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {Directive, EventEmitter, Input, OnInit, Output} from '@angular/core'; | |
import {FormGroup} from '@angular/forms'; | |
import {UtilForm} from '../../models/util/util-form'; | |
import {FormatForm} from './format-form'; | |
import {environment} from '@environments/environment'; | |
/** | |
* @author Jean Paul - <jeanpaulwebb@gmail.com> | |
* @class FormBaseComponent | |
* @description Form Base, Criação dos formulários |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {EventEmitter} from '@angular/core'; | |
import {FormArray, FormBuilder, FormGroup, Validators} from '@angular/forms'; | |
import {UtilForm} from '../../models/util/util-form'; | |
/** | |
* @author Jean Paul <jeanpaulwebb@gmail.com> | |
* @class FormatForm<T> | |
* @description Formatar o formulário dinamicamente | |
* @date 21/05/2020 | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static touchInputs(form: FormGroup): void { | |
if (!form) { | |
return; | |
} | |
Object.keys(form.controls).forEach((key) => { | |
if (form.controls[key] instanceof FormGroup) { | |
this.touchInputs(form.controls[key] as FormGroup); | |
} | |
if (form.controls[key] instanceof FormArray) { | |
if (form.controls[key]["controls"].length) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static toForm(data: any, nullFields?: boolean, formBuilder: FormBuilder = new FormBuilder()): AbstractControl { | |
if (!data) { | |
return formBuilder.control(null); | |
} | |
/** | |
* Se o data for array, percorre-o adicionando recursivamente | |
*/ | |
if (Array.isArray(data)) { | |
const form = formBuilder.array([]); | |
data.forEach(value => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private treatObjectToSend(obj: { [key: string]: any }): { [key: string]: any; } { | |
let finalObject = Object.assign({}, obj); | |
let count = 1; | |
const removePropertiesNull = ( | |
data: { [key: string]: any } = {} | |
): { [key: string]: any } => { | |
const _data = {}; | |
Object.keys(data).forEach((r) => { | |
if ( | |
(data[r] != null && Object.keys(data[r]).length) || |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="col-md-4"> | |
<div class="md-checkbox-list"> | |
<label> </label> | |
<div class="md-checkbox"> | |
<input class="md-check" formControlName="matriz" id="matriz" name="matriz" type="checkbox"> | |
<label for="matriz"> | |
<span class="inc"></span> | |
<span class="check"></span> | |
<span class="box"></span> Matriz? | |
</label> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, {Component} from "react" | |
import user from "../images/user-icon.png" | |
import "../styles/char.css" | |
import axios from "axios"; | |
class Char extends Component { | |
constructor(props) { | |
super(props); | |
this.state = { |