Skip to content

Commit

Permalink
Merge pull request IFRCGo#12 from cbs-reporting-senegal/dataCollector…
Browse files Browse the repository at this point in the history
…Form

interface of register and edit datacollectors
  • Loading branch information
woksin committed Apr 21, 2019
2 parents 5c04f76 + f8f3393 commit 124008b
Show file tree
Hide file tree
Showing 9 changed files with 392 additions and 289 deletions.
268 changes: 150 additions & 118 deletions Source/Reporting/Web/src/app/Management/DataCollectors/edit/edit.html

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,3 +1,36 @@
agm-map {
height: 300px;
}
}
input.ng-dirty.ng-invalid {
color: red
}
.button1 {
border-radius: 4px ;
padding: 10px ;
color: #000 ;
background-color: #fff;
border : 1px solid #d3d3d3 ;
width: 100px ;
}
.button2 {
border-radius: 4px ;
padding: 10px ;
color: #fff ;
background-color: rgb(87, 185, 192);
border : 1px solid #d3d3d3 ;
margin: auto ;
width: 100px ;
}
.form-group input {
background-color: #fafafa;
border: 1px solid #363534;
border-radius: 4px ;
background-color: white;
padding: 20px ;
}

.form-group select,option {
border-radius: 4px ;
border: 1px solid #363534;
padding: 25px ;
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ import { AppInsightsService } from '../../../services/app-insights-service';
styleUrls: ['./edit.scss']
})
export class Edit implements OnInit {
// THIS REALLY NEEDS A SIMPLIFICATION!
//TODO: In backend, have one CRUDy ChangeDataCollectorInformation command, or something, that does all this
error = false;
dataCollector: DataCollector;
phoneNumberString = '';
Expand Down Expand Up @@ -105,6 +107,15 @@ export class Edit implements OnInit {
this.handleTraining(queue);
this.handleQueue(queue);
}
resetForm() {
console.log('reset')
this.inTraining = this.dataCollector.inTraining;
this.initChangeBaseInformation();
this.initChangeLocation();
this.initChangePreferredLanguage();
this.initPhoneNumbers();
this.initVillage();
}

private handleQueue(queue) {
if (queue.length == 0) {
Expand Down
Loading

0 comments on commit 124008b

Please sign in to comment.