Nearme app+cms help

Hi, I bought the Nearmeapp with nearmecms, but I am not getting to much help from the developer. There where many problems with it, all from deploying to the app. But I have fixed most of the issues my self, however, I am having problems with some stuff, but the most important one is the posting from the app stuff… I have tested the original Nearme app from the developer, but it has the same issue.

Here is the complete system:

The code I think is the problem:
AddPlacePage.prototype.onSubmit = function () {
var _this = this;
this.place.title = this.form.value.name;
this.place.category = this.form.value.category;
this.place.description = this.form.value.description;
this.place.address = this.form.value.address;
this.place.website = this.form.value.website;
this.place.phone = this.form.value.phone;
this.showLoadingView();
this.marker.getPosition().then(function (position) {
_this.place.location = position;
_this.place.save().then(function (place) {
_this.showContentView();
_this.translate.get(‘PLACE_ADDED’).subscribe(function (str) { return _this.showToast(str); });
}, function (error) {
_this.showContentView();
_this.translate.get(‘ERROR_PLACE_ADD’).subscribe(function (str) { return _this.showToast(str); });
});
});
};

Anyone able to figure out what is wrong?

I have figured so much, that removing `this.marker.getPosition().then(function (position) {
_this.place.location = position;

`

and then removing the last }); it gives me the error feedback, but I can’t figure out what is wrong there…

Your code is not very readable. Please format it so it becomes easier to read for us. Thanks.

Ok, will try again…

 AddPlacePage.prototype.onSubmit = function () {
    var _this = this;
    this.place.title = this.form.value.name;
    this.place.category = this.form.value.category;
    this.place.description = this.form.value.description;
    this.place.address = this.form.value.address;
    this.place.website = this.form.value.website;
    this.place.phone = this.form.value.phone;
    this.showLoadingView();
    this.marker.getPosition().then(function (position) {
        _this.place.location = position;
        _this.place.save().then(function (place) {
            _this.showContentView();
            _this.translate.get('PLACE_ADDED').subscribe(function (str) { return _this.showToast(str); });
        }, function (error) {
            _this.showContentView();
            _this.translate.get('ERROR_PLACE_ADD').subscribe(function (str) { return _this.showToast(str); });
        });
    });
};

AddPlacePage = __decorate([
    __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Component"])({
        selector: 'page-add-place-page',template:/*ion-inline-start:"/Users/fer/Dev/apps/NearmeApp/src/pages/add-place-page/add-place-page.html"*/'<ion-header>\n  <ion-navbar color="primary">\n    <button ion-button menuToggle>\n      <ion-icon name="menu"></ion-icon>\n    </button>\n    <ion-title>{{ "ADD_PLACE" | translate }}</ion-title>\n  </ion-navbar>\n</ion-header>\n\n<ion-content color="dark">\n\n  <div showWhen="android,ios">\n    <ion-searchbar color="dark" placeholder="{{ \'ENTER_ADDRESS\' | translate }}"\n      (ionInput)="onSearchAddress($event)"></ion-searchbar>\n    <div id="map_add" class="map"></div>\n  </div>\n\n  <empty-view [text]="\'ERROR_CORDOVA_MAPS\' | translate" showWhen="core"></empty-view>\n\n  <ion-list>\n\n    <form [formGroup]="form" (ngSubmit)="onSubmit()" novalidate>\n\n      <ion-item>\n        <ion-icon name="at" item-left color="primary"></ion-icon>\n        <ion-label color="primary">{{ "NAME" | translate }}</ion-label>\n        <ion-input type="text" formControlName="name"></ion-input>\n      </ion-item>\n\n      <ion-item>\n        <ion-icon name="pricetag" item-left color="primary"></ion-icon>\n        <ion-label color="primary">{{ "CATEGORY" | translate }}</ion-label>\n        <ion-select formControlName="category">\n          <ion-option *ngFor="let category of categories" [value]="category">\n            {{ category.title }}\n          </ion-option>\n        </ion-select>\n      </ion-item>\n\n      <ion-item>\n        <ion-icon name="create" item-left color="primary"></ion-icon>\n        <ion-label color="primary">{{ "DESCRIPTION" | translate }}</ion-label>\n        <ion-textarea formControlName="description"></ion-textarea>\n      </ion-item>\n\n      <ion-item>\n        <ion-icon name="globe" item-left color="primary"></ion-icon>\n        <ion-label color="primary">{{ "WEBSITE" | translate }}</ion-label>\n        <ion-input type="url" formControlName="website"></ion-input>\n      </ion-item>\n\n      <ion-item>\n        <ion-icon name="pin" item-left color="primary"></ion-icon>\n        <ion-label color="primary">{{ "ADDRESS" | translate }}</ion-label>\n        <ion-input type="text" formControlName="address">\n        </ion-input>\n      </ion-item>\n\n      <ion-item>\n        <ion-icon name="call" item-left color="primary"></ion-icon>\n        <ion-label color="primary">{{ "PHONE" | translate }}</ion-label>\n        <ion-input type="text" formControlName="phone"></ion-input>\n      </ion-item>\n\n      <ion-item>\n        <ion-label color="primary">\n          {{ "UPLOAD_PICTURE" | translate }}\n        </ion-label>\n        <button type="button" ion-button clear item-right icon-only (click)="onUpload()">\n          <ion-icon name="camera" item-left color="primary"></ion-icon>\n        </button>\n      </ion-item>\n\n      <div padding>\n        <button type="submit" ion-button block [disabled]="!form.valid">\n          {{ "SUBMIT" | translate }}\n        </button>\n      </div>\n\n    </form>\n  </ion-list>\n</ion-content>\n'/*ion-inline-end:"/Users/fer/Dev/apps/NearmeApp/src/pages/add-place-page/add-place-page.html"*/
    }), 
    __metadata('design:paramtypes', [__WEBPACK_IMPORTED_MODULE_0__angular_core__["Injector"], __WEBPACK_IMPORTED_MODULE_7__angular_forms__["FormBuilder"], __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["Platform"], __WEBPACK_IMPORTED_MODULE_3__providers_place_service__["a" /* Place */], __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["Events"], __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["ActionSheetController"]])
], AddPlacePage);
return AddPlacePage;

}(WEBPACK_IMPORTED_MODULE_2__base_page_base_page[“a” /* BasePage */]));

Here is the complete main.js

It might be a bigger problem then I think, but not sure… The review node works, registration works, just adding a new place and editing profile that faulty