Skip to content

Commit 1cc5565

Browse files
committed
saving posting service request, but without XOTL api service
1 parent adc0e0e commit 1cc5565

File tree

5 files changed

+16
-15
lines changed

5 files changed

+16
-15
lines changed

app/model.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@ var Schema = mongoose.Schema;
55
// Creates a User Schema. This will be the basis of how user data is stored in the db
66
var UserSchema = new Schema({
77
name: {type: String, required: true},
8-
gender: {type: String, required: true},
98
description: { type: String, required: true },
10-
skillRequired: { type: String, required: true },
9+
skillrequired: { type: String, required: true },
1110
phone: { type: String, required: true },
1211
location: {type: [Number], required: true}, // [Long, Lat]
1312
htmlverified: String,

public/js/addCtrl.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ addCtrl.controller('addCtrl', function($scope, $http, $rootScope, geolocation, g
6363
var userData = {
6464
name: $scope.formData.name,
6565
description: $scope.formData.description,
66-
skillRequired: $scope.formData.skillRequired,
66+
skillrequired: $scope.formData.skillrequired,
6767
phone: $scope.formData.phone,
6868
location: [$scope.formData.longitude, $scope.formData.latitude],
6969
htmlverified: $scope.formData.htmlverified

public/js/gservice.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ angular.module('gservice', [])
7171
var user = response[i];
7272

7373
// Create popup windows for each record
74-
var contentString = user.name + '<br><b>Busca ayuda en </b>: ' + user.skillRequired + '<br>' +
74+
var contentString = user.name + '<br><b>Busca ayuda en </b>: ' + user.skillrequired + '<br>' +
7575
'<b>situacion</b>: ' + user.description + '</p>';
7676

7777
// Converts each of the JSON records into Google Maps Location format (Note Lat, Lng format).
@@ -82,7 +82,7 @@ angular.module('gservice', [])
8282
maxWidth: 320
8383
}),
8484
user.name,
85-
user.skillRequired,
85+
user.skillrequired,
8686
user.description
8787
))
8888
}
@@ -91,11 +91,11 @@ angular.module('gservice', [])
9191
};
9292

9393
// Constructor for generic location
94-
var Location = function(latlon, message, name, skillRequired, description){
94+
var Location = function(latlon, message, name, skillrequired, description){
9595
this.latlon = latlon;
9696
this.message = message;
9797
this.name = name;
98-
this.skillRequired = skillRequired;
98+
this.skillrequired = skillrequired;
9999
this.description = description;
100100
};
101101

public/partials/addForm.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ <h2 class="panel-title text-center">Requiero un servicio de... <span class="glyp
4646
<div class="form-group">
4747
<!-- Note RefreshLoc button tied to addCtrl. This requests a refresh of the HTML5 verified location. -->
4848
<label for="verified">Verificar mi ubicacion <span><button ng-click="refreshLoc()" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-refresh"></span></button></span></label>
49-
<input type="text" class="form-control" id="verified" placeholder= "Nope (Thanks for spamming my map...)" ng-model="formData.htmlverified" readonly>
49+
<!--
50+
<input type="text" class="form-control" id="verified" placeholder= "Nope (Thanks for spamming my map...)" ng-model="formData.htmlverified" readonly>
51+
-->
5052
</div>
5153

5254
<!-- Submit button. Note that its tied to createUser() function from addCtrl. Also note ng-disabled logic which prevents early submits. -->

public/partials/queryForm.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ <h2 class="panel-title text-center">Encuentra servicios que puedas atendner <spa
2929
-->
3030
<!-- Note ng-true-value which translates check values into explicit gender strings -->
3131
<div class="form-group">
32-
<label for="favlang">Servicio que proveo:</label>
33-
<input type="text" class="form-control" id="favlang" placeholder="Fontarería, Albañilería, Jardinería" ng-model="formData.favlang">
32+
<label for="skillrequired">Servicio que proveo:</label>
33+
<input type="text" class="form-control" id="skillrequired" placeholder="Fontarería, Albañilería, Jardinería" ng-model="formData.skillrequired">
3434
</div>
3535
<div class="form-group">
36-
<label for="favlang">Telefono:</label>
37-
<input type="text" class="form-control" id="favlang" placeholder="+52 1 33 373845" ng-model="formData.favlang">
36+
<label for="phone">Telefono:</label>
37+
<input type="text" class="form-control" id="phone" placeholder="+52 1 33 373845" ng-model="formData.phone">
3838
</div>
3939
<label>Genero</label>
4040
<div class="form-group">
@@ -54,15 +54,15 @@ <h2 class="panel-title text-center">Encuentra servicios que puedas atendner <spa
5454
<label>Contactar me por:</label>
5555
<div class="form-group">
5656
<label class="checkbox-inline">
57-
<input type="checkbox" name="optionsRadios" id="checkphone" value="telefono" ng-model="formData.male" ng-true-value = "'Telefono'">
57+
<input type="checkbox" name="optionsRadios" id="checkphone" value="telefono" ng-model="formData.contactphone" ng-true-value = "'Telefono'">
5858
Telefono
5959
</label>
6060
<label class="checkbox-inline">
61-
<input type="checkbox" name="optionsRadios" id="checkwhatsapp" value="whatsapp" ng-model="formData.female" ng-true-value="'WhatsApp'">
61+
<input type="checkbox" name="optionsRadios" id="checkwhatsapp" value="whatsapp" ng-model="formData.contactwhatsapp" ng-true-value="'WhatsApp'">
6262
WhatsApp
6363
</label>
6464
<label class="checkbox-inline">
65-
<input type="checkbox" name="optionsRadios" id="checkchambapp" value="chambapp" ng-model="formData.other" ng-true-value="'ChambApp'">
65+
<input type="checkbox" name="optionsRadios" id="checkchambapp" value="chambapp" ng-model="formData.contactchamapp" ng-true-value="'ChambApp'">
6666
ChambApp
6767
</label>
6868
</div>

0 commit comments

Comments
 (0)