-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jean Philip de Rogatis
authored and
Jean Philip de Rogatis
committed
Nov 22, 2016
1 parent
5ab34f0
commit 16532d0
Showing
25 changed files
with
6,092 additions
and
6 deletions.
There are no files selected for viewing
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
Binary file not shown.
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
const angular = require('angular'); | ||
const ngRoute = require('angular-route'); | ||
import routing from './cad-ong.routes'; | ||
|
||
export class CadOngController { | ||
$http; | ||
$scope; | ||
$routeParams; | ||
listOng = []; | ||
listAreas = []; | ||
listAreasDeAtuacao =[]; | ||
ong = {} | ||
/*@ngInject*/ | ||
constructor($http, $scope, socket, $routeParams) { | ||
this.$http = $http; | ||
this.$scope = $scope; | ||
this.$routeParams = $routeParams; | ||
this.listAreasDeAtuacao = [ | ||
{ abbrev: 'educacao', desc: 'Educação' }, | ||
{ abbrev: 'saude', desc: 'Saúde' }, | ||
{ abbrev: 'combateAProbreza', desc: 'Combate A Probreza' } | ||
] | ||
|
||
} | ||
|
||
|
||
carregaLista() { | ||
this.$http.get('api/ong') | ||
.then(res => { | ||
this.listOng = res.data; | ||
}) | ||
} | ||
|
||
|
||
$onInit() { | ||
this.carregaLista() | ||
} | ||
|
||
addOng(ongForm) { | ||
this.$http.post('api/ong', ongForm); | ||
} | ||
} | ||
|
||
export default angular.module('doebemOrgApp.cadOng', [ ngRoute]) .config(routing) .component('cadOng', { | ||
template: require('./cad-ong.pug'), controller: CadOngController | ||
}) | ||
.name; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
div#cadOng(layout="column" layout-align="center center") | ||
h1 Cadastre aqui sua ONG | ||
.container(layout = "row" ) | ||
div#list(flex="25") | ||
md-list | ||
md-list-item(ng-repeat="ong in $ctrl.listOng") | ||
h3 {{ong.nome}} | ||
div#form(flex="75") | ||
h2.sectionHeading Cadastro | ||
div(layout="column" flex="100") | ||
form(name="ongForm" layout="column" ng-submit="$ctrl.addOng($ctrl.ongForm)") | ||
div(layout="column" layout-gt-sm="row" flex="100" ) | ||
div#info(layout="column" flex="100") | ||
md-input-container.md-block(flex-gt-sm) | ||
label Nome Fantasia | ||
input(ng-model="$ctrl.ongForm.nomeFantasia" required) | ||
md-input-container.md-block(flex-gt-sm) | ||
label Razão Social | ||
input(ng-model="$ctrl.ongForm.razaoSocial" required) | ||
md-input-container.md-block(flex-gt-sm) | ||
label CNPJ | ||
input(ng-model="$ctrl.ongForm.cnpj" required) | ||
md-input-container.md-block(flex-gt-sm) | ||
label End | ||
input(ng-model="$ctrl.ongForm.end" required) | ||
md-input-container.md-block(flex-gt-sm) | ||
label Cidade | ||
input(ng-model="$ctrl.ongForm.cidade" required) | ||
md-input-container.md-block(flex-gt-sm) | ||
label Estado | ||
md-select(ng-model="$ctrl.ongForm.uf" ) | ||
md-option(ng-repeat="state in $ctrl.states" value="{{state.Sigla}}") | ||
span {{state.Nome}} | ||
md-input-container.md-block(flex-gt-sm) | ||
label Cep | ||
input(ng-model="$ctrl.ongForm.cep" required) | ||
md-input-container.md-block | ||
label Area de Atuação | ||
md-select(ng-model="$ctrl.ongForm.areaDeAtuacao" ) | ||
md-option(ng-repeat="area in $ctrl.listAreasDeAtuacao" value="{{area.abbrev}}") | ||
span {{area.desc}} | ||
md-input-container.md-block | ||
label Logo | ||
input(ng-model="$ctrl.ongForm.logo" required) | ||
div#desc(layout="$ctrl.column" flex="100") | ||
md-input-container.md-block(flex-gt-sm) | ||
label Desc | ||
textarea(ng-model="$ctrl.ongForm.desc" columns="1") | ||
div(flex="10") | ||
md-button.md-raized.md-primary(type="submit") Cadastrar | ||
|
||
script(type="text/ng-template" id="dialogEmailSend.tmpl.pug") | ||
md-dialog(aria-label="emailSend") | ||
form(ng-cloak) | ||
md-toolbar | ||
div.md-toolbar-tools | ||
h2 Email Enviado! | ||
span(flex) | ||
md-button.md-icon-button(aria-label="md-button ok", ng-click="cancel()") | ||
md-icon | ||
ng-md-icon.name(icon="close" style="fill: white") | ||
md-dialog-content | ||
div.md-dialog-content | ||
h2 Obrigado pela sua mensagem! {{$ctrl.user.fistName}} | ||
md-dialog-actions(layout="row") | ||
span(flex) | ||
md-button(ng-click="cancel()") Ok |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
'use strict'; | ||
|
||
export default function routes($routeProvider) { | ||
'ngInject'; | ||
$routeProvider | ||
.when('/cadOng', { | ||
template: '<cad-ong></cad-ong>' | ||
}) | ||
|
||
}; | ||
|
Empty file.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
const angular = require('angular'); | ||
const ngRoute = require('angular-route'); | ||
import routing from './cad-ong.routes'; | ||
|
||
export class CadOngController { | ||
$http; | ||
$scope; | ||
$routeParams; | ||
listOng = []; | ||
listAreas = []; | ||
listAreasDeAtuacao =[]; | ||
ong = {} | ||
/*@ngInject*/ | ||
constructor($http, $scope, socket, $routeParams) { | ||
this.$http = $http; | ||
this.$scope = $scope; | ||
this.$routeParams = $routeParams; | ||
this.listAreasDeAtuacao =[ | ||
{abbrev: 'educacao', desc: 'Educação'}, | ||
{abbrev: 'saude', desc: 'Saúde'}, | ||
{abbrev: 'combateAProbreza', desc: 'Combate A Probreza'} | ||
] | ||
|
||
} | ||
|
||
carregaLista() { | ||
this.$http.get('api/ong') | ||
.then(res => { | ||
this.listOng = res.data; | ||
}) | ||
} | ||
|
||
$onInit() { | ||
this.carregaLista() | ||
} | ||
|
||
addOng(ongForm) { | ||
this.$http.post('api/ong', ongForm); | ||
} | ||
} | ||
|
||
export default angular.module('doebemOrgApp.cadOng', [ ngRoute]) .config(routing) .component('cadOng', { | ||
template: require('./cad-ong.pug'), controller: CadOngController | ||
}) | ||
.name; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
div#cadOng(layout="column" layout-align="center center") | ||
h1 Cadastre aqui sua ONG | ||
.container(layout = "row" ) | ||
div#list(flex="25") | ||
md-list | ||
md-list-item(ng-repeat="ong in $ctrl.listOng") | ||
h3 {{ong.nome}} | ||
div#form(flex="75") | ||
h2.sectionHeading Cadastro | ||
div(layout="column" flex="100") | ||
form(name="ongForm" layout="column" ng-submit="$ctrl.addOng($ctrl.ongForm)") | ||
div(layout="column" layout-gt-sm="row" flex="100" ) | ||
div#info(layout="column" flex="100") | ||
md-input-container.md-block(flex-gt-sm) | ||
label Nome Fantasia | ||
input(ng-model="$ctrl.ongForm.nomeFantasia" required) | ||
md-input-container.md-block(flex-gt-sm) | ||
label Razão Social | ||
input(ng-model="$ctrl.ongForm.razaoSocial" required) | ||
md-input-container.md-block(flex-gt-sm) | ||
label End | ||
input(ng-model="$ctrl.ongForm.end" required) | ||
md-input-container.md-block(flex-gt-sm) | ||
label Cidade | ||
input(ng-model="$ctrl.ongForm.cidade" required) | ||
md-input-container.md-block(flex-gt-sm) | ||
label Estado | ||
input(ng-model="$ctrl.ongForm.estado" required) | ||
md-input-container.md-block(flex-gt-sm) | ||
label Cep | ||
input(ng-model="$ctrl.ongForm.cep" required) | ||
md-input-container.md-block | ||
label Area de Atuação | ||
md-select(ng-model="$ctrl.ongForm.areaDeAtuacao" ) | ||
md-option(ng-repeat="area in $ctrl.listAreasDeAtuacao" value="{{area.abbrev}}") | ||
span {{area.desc}} | ||
md-input-container.md-block | ||
label Logo | ||
input(ng-model="$ctrl.ongForm.logo" required) | ||
div#desc(layout="$ctrl.column" flex="100") | ||
md-input-container.md-block(flex-gt-sm) | ||
label Desc | ||
textarea(ng-model="$ctrl.ongForm.desc" columns="1") | ||
div(flex="10") | ||
md-button.md-raized.md-primary(type="submit") Cadastrar | ||
|
||
script(type="text/ng-template" id="dialogEmailSend.tmpl.pug") | ||
md-dialog(aria-label="emailSend") | ||
form(ng-cloak) | ||
md-toolbar | ||
div.md-toolbar-tools | ||
h2 Email Enviado! | ||
span(flex) | ||
md-button.md-icon-button(aria-label="md-button ok", ng-click="cancel()") | ||
md-icon | ||
ng-md-icon.name(icon="close" style="fill: white") | ||
md-dialog-content | ||
div.md-dialog-content | ||
h2 Obrigado pela sua mensagem! {{$ctrl.user.fistName}} | ||
md-dialog-actions(layout="row") | ||
span(flex) | ||
md-button(ng-click="cancel()") Ok |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
'use strict'; | ||
|
||
export default function routes($routeProvider) { | ||
'ngInject'; | ||
$routeProvider | ||
.when('/cadOng', { | ||
template: '<cad-ong></cad-ong>' | ||
}) | ||
|
||
}; | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
div#cadOng{ | ||
padding-top: 70px; | ||
} |
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
Oops, something went wrong.