service added

This commit is contained in:
CHIEFSOFT\ameye
2023-05-13 06:15:39 -04:00
parent 1f7801cf60
commit 8431f7c003
9 changed files with 176 additions and 49 deletions
+4 -1
View File
@@ -7,9 +7,12 @@ import { IonicModule, IonicRouteStrategy } from '@ionic/angular';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { HttpClientModule } from '@angular/common/http';
@NgModule({
declarations: [AppComponent],
imports: [BrowserModule, IonicModule.forRoot(), AppRoutingModule],
imports: [BrowserModule, IonicModule.forRoot(), AppRoutingModule, HttpClientModule],
providers: [{ provide: RouteReuseStrategy, useClass: IonicRouteStrategy }],
bootstrap: [AppComponent],
})
@@ -1,11 +1,3 @@
/*
Authors : initappz (Rahul Jograna)
Website : https://initappz.com/
App Name : E-Learning App Template
This App Template Source code is licensed as per the
terms found in the Website https://initappz.com/license
Copyright and Good Faith Purchasers © 2021-present initappz.
*/
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
-8
View File
@@ -1,11 +1,3 @@
/*
Authors : initappz (Rahul Jograna)
Website : https://initappz.com/
App Name : E-Learning App Template
This App Template Source code is licensed as per the
terms found in the Website https://initappz.com/license
Copyright and Good Faith Purchasers © 2021-present initappz.
*/
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
-8
View File
@@ -1,11 +1,3 @@
<!--
Authors : initappz (Rahul Jograna)
Website : https://initappz.com/
App Name : E-Learning App Template
This App Template Source code is licensed as per the
terms found in the Website https://initappz.com/license
Copyright and Good Faith Purchasers © 2021-present initappz.
-->
<ion-content class="ion-padding">
<div class="ion-padding space">
<div>
-8
View File
@@ -1,11 +1,3 @@
/*
Authors : initappz (Rahul Jograna)
Website : https://initappz.com/
App Name : E-Learning App Template
This App Template Source code is licensed as per the
terms found in the Website https://initappz.com/license
Copyright and Good Faith Purchasers © 2021-present initappz.
*/
ion-content {
.simp_lbl {
margin-top: 20px;
-8
View File
@@ -1,11 +1,3 @@
/*
Authors : initappz (Rahul Jograna)
Website : https://initappz.com/
App Name : E-Learning App Template
This App Template Source code is licensed as per the
terms found in the Website https://initappz.com/license
Copyright and Good Faith Purchasers © 2021-present initappz.
*/
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { IonicModule } from '@ionic/angular';
-8
View File
@@ -1,11 +1,3 @@
/*
Authors : initappz (Rahul Jograna)
Website : https://initappz.com/
App Name : E-Learning App Template
This App Template Source code is licensed as per the
terms found in the Website https://initappz.com/license
Copyright and Good Faith Purchasers © 2021-present initappz.
*/
import { Router } from '@angular/router';
import { Component, OnInit } from '@angular/core';
+16
View File
@@ -0,0 +1,16 @@
import { TestBed } from '@angular/core/testing';
import { WrenchService } from './wrench.service';
describe('WrenchService', () => {
let service: WrenchService;
beforeEach(() => {
TestBed.configureTestingModule({});
service = TestBed.inject(WrenchService);
});
it('should be created', () => {
expect(service).toBeTruthy();
});
});
+156
View File
@@ -0,0 +1,156 @@
import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import 'rxjs/add/operator/map';
import { environment } from 'src/environments/environment';
@Injectable({
providedIn: 'root'
})
export class WrenchService {
apiKey = '99dfe35fcb7de1ee';
url;
constructor(private http: HttpClient) {
this.url = 'https://www.wrenchboard.com/svs/user';
}
getPostData(reqPath:string, reqData): Observable<any> {
return this.http.post(
`${environment.baseUrl}/movie/}`,reqData
);
}
loginUser(loginData) {
return this.getPostData('getPostData',loginData);
}
/*
registerUser(newUserData) {
// no session needed - will start the session
return this.http.post(this.url + '/createmobileuser', newUserData)
.map(res => res.json());
}
completeRegisterUser(newUserData) {
// no session needed - will start the session
return this.http.post(this.url + '/completemobileuser', newUserData)
.map(res => res.json());
}
startResetPassword(UserData) {
// no session needed - will start the session
return this.http.post(this.url + '/startresetpasword', UserData)
.map(res => res.json());
}
getStartData() {
return this.http.post(this.url + '/startjoblist', { limit: '10', page: '1' })
.map(res => res.json());
}
getJobsData() {
return this.http.post(this.url + '/getjobsdata', { limit: '20', page: '1' })
.map(res => res.json());
}
getPendingJobsData(userData: any) {
return this.http.post(this.url + '/getpendingjobs', userData)
.map(res => res.json());
}
getMessages(UserData) {
console.log("getMessages Called");
return this.http.post(this.url + '/message', UserData)
.map(res => res.json());
}
//JOBS
getActiveJobData(UserData) {
console.log("getActiveJobData Called");
return this.http.post(this.url + '/activejoblist', UserData)
.map(res => res.json());
}
getMyOffersJobData(UserData) {
console.log("getMyOffersJobData Called");
return this.http.post(this.url + '/offerslist', UserData)
.map(res => res.json());
}
//=========================================
getPaymentHx(UserData) {
console.log("getPaymentHx Called");
return this.http.post(this.url + '/paymenthx', UserData)
.map(res => res.json());
}
getOffersJobDataff() {
console.log("getOffersJobData Called");
return this.http.post(this.url + '/offerslist', { limit: '10', page: '1', sessionid: 'ADNGHGHGHGHGHGH', member_id: 1 })
.map(res => res.json());
}
getDashData(memberID, sessionID) {
// session required here
return this.http.post(this.url + '/dashdata', { sessionid: sessionID, member_id: memberID })
.map(res => res.json());
}
getUserAccount(memberID, sessionID) {
// account
return this.http.post(this.url + '/account', { sessionid: sessionID, member_id: memberID })
.map(res => res.json());
}
getProfile(memberID, sessionID) {
//loadprofile
return this.http.post(this.url + '/loadprofile', { sessionid: sessionID, member_id: memberID })
.map(res => res.json());
}
getUserBankList(UserData) {
console.log("getActiveJobData Called");
return this.http.post(this.url + '/mybanklist', UserData)
.map(res => res.json());
}
userSendMoneyt(SendMoneydata) {
console.log("userSendMoneyt Called");
return this.http.post(this.url + '/sendmoney', SendMoneydata)
.map(res => res.json());
}
sendMoneyFee(SendMoneydata) {
console.log("sendMoneyFee Called");
return this.http.post(this.url + '/sendmoneyfee', SendMoneydata)
.map(res => res.json());
}
sendJobInterest(SendJobInterestData) {
console.log("sendJobInterest Called");
return this.http.post(this.url + '/sendinterest', SendJobInterestData)
.map(res => res.json());
}
sendOfferInterest(SendJobInterestData) {
console.log("sendOfferInterest Called");
return this.http.post(this.url + '/sendofferinterest', SendJobInterestData)
.map(res => res.json());
}
sendJobInterestMessage(sendJobInterestMessage) {
console.log("sendJobInterestMessage Called");
return this.http.post(this.url + '/sendinterestmessage', sendJobInterestMessage)
.map(res => res.json());
}
getTaskMessage(taskData: any) {
console.log("getTaskMessage Called");
return this.http.post(this.url + '/taskmessage', taskData)
.map(res => res.json());
}
sendTaskMessage(taskMessage: any) {
console.log("sendTaskMessage Called");
return this.http.post(this.url + '/sendtaskmessage', taskMessage)
.map(res => res.json());
}
*/
}