Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
Fengshui-Seller-iOS
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Monika Agarwal
Fengshui-Seller-iOS
Commits
6a925671
Commit
6a925671
authored
Sep 14, 2018
by
Anand.suthar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolve issues
parent
4fe80ced
Hide whitespace changes
Inline
Side-by-side
Showing
36 changed files
with
478 additions
and
71 deletions
+478
-71
Bhagyashree.xcodeproj/project.pbxproj
+6
-6
Bhagyashree.xcworkspace/xcuserdata/sunarcmac.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
Bhagyashree.xcworkspace/xcuserdata/sunarcmac.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
+66
-2
Bhagyashree/AppConfiguration.swift
+2
-2
Bhagyashree/Info.plist
+2
-2
Bhagyashree/Sunarc/Controller/Appointment/CompletedServicesViewController.swift
+1
-0
Bhagyashree/Sunarc/Controller/Appointment/InvalidServicesViewController.swift
+1
-0
Bhagyashree/Sunarc/Controller/Appointment/OnGoingServicesViewController.swift
+1
-0
Bhagyashree/Sunarc/Controller/Appointment/ProcessingViewController.swift
+1
-0
Bhagyashree/Sunarc/Controller/Appointment/Riding App 2018-09-10 10-22-25/DistributionSummary.plist
+100
-0
Bhagyashree/Sunarc/Controller/Appointment/Riding App 2018-09-10 10-22-25/ExportOptions.plist
+27
-0
Bhagyashree/Sunarc/Controller/Appointment/Riding App 2018-09-10 10-22-25/Packaging.log
+0
-0
Bhagyashree/Sunarc/Controller/Appointment/Riding App 2018-09-10 10-22-25/Riding App.ipa
+0
-0
Bhagyashree/Sunarc/Controller/Appointment/ServiceDetailViewController.swift
+33
-7
Bhagyashree/Sunarc/Controller/Appointment/ServicesListViewController.swift
+1
-0
Bhagyashree/Sunarc/Controller/Home/EnquiryDetailsViewController.swift
+1
-0
Bhagyashree/Sunarc/Controller/Home/HomePageViewController.swift
+31
-13
Bhagyashree/Sunarc/Controller/Home/OngoingEnquiryViewController.swift
+1
-0
Bhagyashree/Sunarc/Controller/Home/OnlineEnquiryViewController.swift
+33
-1
Bhagyashree/Sunarc/Controller/Me/ChangePasswordViewController.swift
+7
-2
Bhagyashree/Sunarc/Controller/Me/MyAllServiceOrderViewController.swift
+1
-0
Bhagyashree/Sunarc/Controller/Me/MyCompletedOrdersViewController.swift
+1
-0
Bhagyashree/Sunarc/Controller/Me/MyOngoingServiceOrderViewController.swift
+1
-0
Bhagyashree/Sunarc/Controller/Me/MyUploadResultViewController.swift
+1
-0
Bhagyashree/Sunarc/Controller/Messages/NotificationsViewController.swift
+58
-16
Bhagyashree/Sunarc/Model/Appointment/Appointment.swift
+29
-7
Bhagyashree/Sunarc/Model/Appointment/AppointmentExt.swift
+0
-2
Bhagyashree/Sunarc/Model/Home/Enquiry/Enquiry.swift
+5
-0
Bhagyashree/Sunarc/Model/Home/HomeScreen/Customer.swift
+3
-0
Bhagyashree/Sunarc/Model/Me/Service.swift
+4
-0
Bhagyashree/Sunarc/Model/Notifications/MyNotification.swift
+3
-0
Bhagyashree/Sunarc/Model/Notifications/MyNotificationExt.swift
+29
-5
Bhagyashree/Sunarc/Model/UserExt.swift
+23
-1
Bhagyashree/Sunarc/Other/HTTP/HTTP.swift
+2
-2
Bhagyashree/Sunarc/View/Appointment.storyboard
+1
-1
Bhagyashree/Sunarc/View/Home.storyboard
+3
-2
No files found.
Bhagyashree.xcodeproj/project.pbxproj
View file @
6a925671
...
...
@@ -2881,7 +2881,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME
=
AppIcon
;
CLANG_ENABLE_MODULES
=
YES
;
CODE_SIGN_ENTITLEMENTS
=
Bhagyashree/Bhagyashree.entitlements
;
CODE_SIGN_IDENTITY
=
"iPhone D
eveloper
"
;
CODE_SIGN_IDENTITY
=
"iPhone D
istribution
"
;
CODE_SIGN_STYLE
=
Manual
;
DEVELOPMENT_TEAM
=
S5AR757G56
;
INFOPLIST_FILE
=
Bhagyashree/Info.plist
;
...
...
@@ -2889,8 +2889,8 @@
LD_RUNPATH_SEARCH_PATHS
=
"$(inherited) @executable_path/Frameworks"
;
PRODUCT_BUNDLE_IDENTIFIER
=
"com.gdi.yuanzhongsiu-seller"
;
PRODUCT_NAME
=
"$(TARGET_NAME)"
;
PROVISIONING_PROFILE
=
"6
f086210-986e-4363-bee7-4d19b9926e76
"
;
PROVISIONING_PROFILE_SPECIFIER
=
fengshui_seller_dev
;
PROVISIONING_PROFILE
=
"6
02859fb-319a-4c6c-9f5d-c18ff8e1ea2c
"
;
PROVISIONING_PROFILE_SPECIFIER
=
FengShui_Seller_AdHok
;
SWIFT_OBJC_BRIDGING_HEADER
=
"Bhagyashree/MARKET PLACE/Seller Create Credit Memo/Bhagyashree-Bridging-Header.h"
;
SWIFT_OPTIMIZATION_LEVEL
=
"-Onone"
;
SWIFT_VERSION
=
4.0
;
...
...
@@ -2906,7 +2906,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME
=
AppIcon
;
CLANG_ENABLE_MODULES
=
YES
;
CODE_SIGN_ENTITLEMENTS
=
Bhagyashree/Bhagyashree.entitlements
;
CODE_SIGN_IDENTITY
=
"iPhone D
eveloper
"
;
CODE_SIGN_IDENTITY
=
"iPhone D
istribution
"
;
CODE_SIGN_STYLE
=
Manual
;
DEVELOPMENT_TEAM
=
S5AR757G56
;
INFOPLIST_FILE
=
Bhagyashree/Info.plist
;
...
...
@@ -2914,8 +2914,8 @@
LD_RUNPATH_SEARCH_PATHS
=
"$(inherited) @executable_path/Frameworks"
;
PRODUCT_BUNDLE_IDENTIFIER
=
"com.gdi.yuanzhongsiu-seller"
;
PRODUCT_NAME
=
"$(TARGET_NAME)"
;
PROVISIONING_PROFILE
=
"6
f086210-986e-4363-bee7-4d19b9926e76
"
;
PROVISIONING_PROFILE_SPECIFIER
=
fengshui_seller_dev
;
PROVISIONING_PROFILE
=
"6
02859fb-319a-4c6c-9f5d-c18ff8e1ea2c
"
;
PROVISIONING_PROFILE_SPECIFIER
=
FengShui_Seller_AdHok
;
SWIFT_OBJC_BRIDGING_HEADER
=
"Bhagyashree/MARKET PLACE/Seller Create Credit Memo/Bhagyashree-Bridging-Header.h"
;
SWIFT_VERSION
=
4.0
;
TARGETED_DEVICE_FAMILY
=
"1,2"
;
...
...
Bhagyashree.xcworkspace/xcuserdata/sunarcmac.xcuserdatad/UserInterfaceState.xcuserstate
View file @
6a925671
No preview for this file type
Bhagyashree.xcworkspace/xcuserdata/sunarcmac.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
View file @
6a925671
...
...
@@ -42,7 +42,7 @@
moduleName =
"Bhagyashree"
usesParentBreakpointCondition =
"Yes"
urlString =
"file:///Users/sunarcmac/Documents/Futurecommerce/Fengshui-Seller-iOS/Bhagyashree/Sunarc/Controller/Appointment/Cells/PlayAudioCell.swift"
timestampString =
"558
090421.170235
"
timestampString =
"558
436696.539937
"
startingColumnNumber =
"9223372036854775807"
endingColumnNumber =
"9223372036854775807"
startingLineNumber =
"46"
...
...
@@ -57,7 +57,7 @@
moduleName =
"Bhagyashree"
usesParentBreakpointCondition =
"Yes"
urlString =
"file:///Users/sunarcmac/Documents/Futurecommerce/Fengshui-Seller-iOS/Bhagyashree/Sunarc/Controller/Appointment/Cells/PlayAudioCell.swift"
timestampString =
"558
090421.1732301
"
timestampString =
"558
436696.5445189
"
startingColumnNumber =
"9223372036854775807"
endingColumnNumber =
"9223372036854775807"
startingLineNumber =
"47"
...
...
@@ -99,5 +99,69 @@
landmarkType =
"7"
>
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID =
"Xcode.Breakpoint.FileBreakpoint"
>
<BreakpointContent
shouldBeEnabled =
"Yes"
ignoreCount =
"0"
continueAfterRunningActions =
"No"
filePath =
"Bhagyashree/Sunarc/Model/Me/Service.swift"
timestampString =
"558349856.4012671"
startingColumnNumber =
"9223372036854775807"
endingColumnNumber =
"9223372036854775807"
startingLineNumber =
"51"
endingLineNumber =
"51"
landmarkName =
"initWithJSON(json:)"
landmarkType =
"7"
>
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID =
"Xcode.Breakpoint.FileBreakpoint"
>
<BreakpointContent
shouldBeEnabled =
"Yes"
ignoreCount =
"0"
continueAfterRunningActions =
"No"
filePath =
"Bhagyashree/Sunarc/Model/Appointment/Appointment.swift"
timestampString =
"558349856.401841"
startingColumnNumber =
"9223372036854775807"
endingColumnNumber =
"9223372036854775807"
startingLineNumber =
"38"
endingLineNumber =
"38"
landmarkName =
"initWithJSON(json:)"
landmarkType =
"7"
>
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID =
"Xcode.Breakpoint.FileBreakpoint"
>
<BreakpointContent
shouldBeEnabled =
"Yes"
ignoreCount =
"0"
continueAfterRunningActions =
"No"
filePath =
"Bhagyashree/Sunarc/Other/HTTP/HTTP.swift"
timestampString =
"558437756.32651"
startingColumnNumber =
"9223372036854775807"
endingColumnNumber =
"9223372036854775807"
startingLineNumber =
"113"
endingLineNumber =
"113"
landmarkName =
"connectWithRequestObject(api:parameters:method:contentType:indicator:success:failure:)"
landmarkType =
"7"
>
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID =
"Xcode.Breakpoint.FileBreakpoint"
>
<BreakpointContent
shouldBeEnabled =
"Yes"
ignoreCount =
"0"
continueAfterRunningActions =
"No"
filePath =
"Bhagyashree/Sunarc/Controller/Me/ChangePasswordViewController.swift"
timestampString =
"558434383.435323"
startingColumnNumber =
"9223372036854775807"
endingColumnNumber =
"9223372036854775807"
startingLineNumber =
"36"
endingLineNumber =
"36"
landmarkName =
"confirm()"
landmarkType =
"7"
>
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>
</Bucket>
Bhagyashree/AppConfiguration.swift
View file @
6a925671
...
...
@@ -15,8 +15,8 @@ var DEFAULT_WEBSITE_ID = "1"
//
var BASE_DOMAIN = "http://18.136.9.203" // test
var
BASE_DOMAIN
=
"http://54.251.144.17"
// dev
var
BASE_DOMAIN
=
"http://18.136.9.203"
// test
//
var BASE_DOMAIN = "http://54.251.144.17" // dev
//var BASE_DOMAIN = "http://13.251.93.24"
var
HOST_NAME
=
BASE_DOMAIN
+
"/index.php/"
...
...
Bhagyashree/Info.plist
View file @
6a925671
...
...
@@ -11,13 +11,13 @@
<
k
e
y
>
CFBundleInfoDictionaryVersion
<
/k
e
y
>
<
string
>
6.0
<
/string
>
<
k
e
y
>
CFBundleName
<
/k
e
y
>
<
string
>
Fengshui
Seller
<
/string
>
<
string
>
iAstro
(
Master
)
<
/string
>
<
k
e
y
>
CFBundlePackageType
<
/k
e
y
>
<
string
>
APPL
<
/string
>
<
k
e
y
>
CFBundleShortVersionString
<
/k
e
y
>
<
string
>
1.0
<
/string
>
<
k
e
y
>
CFBundleVersion
<
/k
e
y
>
<
string
>
1
2
<
/string
>
<
string
>
1
4
<
/string
>
<
k
e
y
>
Fabric
<
/k
e
y
>
<
d
i
c
t
>
<
k
e
y
>
APIKey
<
/k
e
y
>
...
...
Bhagyashree/Sunarc/Controller/Appointment/CompletedServicesViewController.swift
View file @
6a925671
...
...
@@ -116,6 +116,7 @@ extension CompletedServicesViewController: UITableViewDelegate, UITableViewDataS
let
chatViewController
=
Utils
.
viewController
(
storyboardName
:
"Home"
,
ofType
:
OnlineEnquiryViewController
.
self
)
if
let
orderId
=
selectedService
.
orderId
{
chatViewController
.
orderId
=
orderId
chatViewController
.
customerId
=
selectedService
.
customerId
!
self
.
navigationController
?
.
pushViewController
(
chatViewController
,
animated
:
true
)
}
}
else
{
...
...
Bhagyashree/Sunarc/Controller/Appointment/InvalidServicesViewController.swift
View file @
6a925671
...
...
@@ -116,6 +116,7 @@ extension InvalidServicesViewController: UITableViewDelegate, UITableViewDataSou
let
chatViewController
=
Utils
.
viewController
(
storyboardName
:
"Home"
,
ofType
:
OnlineEnquiryViewController
.
self
)
if
let
orderId
=
selectedService
.
orderId
{
chatViewController
.
orderId
=
orderId
chatViewController
.
customerId
=
selectedService
.
customerId
!
self
.
navigationController
?
.
pushViewController
(
chatViewController
,
animated
:
true
)
}
}
else
{
...
...
Bhagyashree/Sunarc/Controller/Appointment/OnGoingServicesViewController.swift
View file @
6a925671
...
...
@@ -122,6 +122,7 @@ extension OnGoingServicesViewController: UITableViewDelegate, UITableViewDataSou
let
chatViewController
=
Utils
.
viewController
(
storyboardName
:
"Home"
,
ofType
:
OnlineEnquiryViewController
.
self
)
if
let
orderId
=
selectedService
.
orderId
{
chatViewController
.
orderId
=
orderId
chatViewController
.
customerId
=
selectedService
.
customerId
!
self
.
navigationController
?
.
pushViewController
(
chatViewController
,
animated
:
true
)
}
}
else
{
...
...
Bhagyashree/Sunarc/Controller/Appointment/ProcessingViewController.swift
View file @
6a925671
...
...
@@ -116,6 +116,7 @@ extension ProcessingViewController: UITableViewDelegate, UITableViewDataSource {
let
chatViewController
=
Utils
.
viewController
(
storyboardName
:
"Home"
,
ofType
:
OnlineEnquiryViewController
.
self
)
if
let
orderId
=
selectedService
.
orderId
{
chatViewController
.
orderId
=
orderId
chatViewController
.
customerId
=
selectedService
.
customerId
!
self
.
navigationController
?
.
pushViewController
(
chatViewController
,
animated
:
true
)
}
}
else
{
...
...
Bhagyashree/Sunarc/Controller/Appointment/Riding App 2018-09-10 10-22-25/DistributionSummary.plist
0 → 100644
View file @
6a925671
<
?xml
v
e
rsion="
1
.
0
"
e
n
c
o
d
ing="UT
F
-
8
"?
>
<
!
D
O
C
TYP
E
plist
PU
B
LI
C
"-//
A
ppl
e
//
D
T
D
PLIST
1
.
0
//
E
N"
"http://www.
a
ppl
e
.
c
om/
D
T
D
s/Prop
e
rtyList-
1
.
0
.
d
t
d
"
>
<
plist
v
e
rsion="
1
.
0
"
>
<
d
i
c
t
>
<
k
e
y
>
Riding
App.ipa
<
/k
e
y
>
<
a
rr
a
y
>
<
d
i
c
t
>
<
k
e
y
>
architectures
<
/k
e
y
>
<
a
rr
a
y
>
<
string
>
arm64
<
/string
>
<
/
a
rr
a
y
>
<
k
e
y
>
certificate
<
/k
e
y
>
<
d
i
c
t
>
<
k
e
y
>
SHA1
<
/k
e
y
>
<
string
>
21DF4DE08BA640774E2E15C3B582EC89ACC484BE
<
/string
>
<
k
e
y
>
dateExpires
<
/k
e
y
>
<
string
>
09/05/19
<
/string
>
<
k
e
y
>
type
<
/k
e
y
>
<
string
>
iOS
Distribution
<
/string
>
<
/
d
i
c
t
>
<
k
e
y
>
embeddedBinaries
<
/k
e
y
>
<
a
rr
a
y
>
<
d
i
c
t
>
<
k
e
y
>
architectures
<
/k
e
y
>
<
a
rr
a
y
>
<
string
>
arm64
<
/string
>
<
/
a
rr
a
y
>
<
k
e
y
>
certificate
<
/k
e
y
>
<
d
i
c
t
>
<
k
e
y
>
SHA1
<
/k
e
y
>
<
string
>
21DF4DE08BA640774E2E15C3B582EC89ACC484BE
<
/string
>
<
k
e
y
>
dateExpires
<
/k
e
y
>
<
string
>
09/05/19
<
/string
>
<
k
e
y
>
type
<
/k
e
y
>
<
string
>
iOS
Distribution
<
/string
>
<
/
d
i
c
t
>
<
k
e
y
>
entitlements
<
/k
e
y
>
<
d
i
c
t
>
<
k
e
y
>
application-identifier
<
/k
e
y
>
<
string
>
WC72QNYT4F.com.ridingapp.sunarc.notification
<
/string
>
<
k
e
y
>
com.apple.developer.team-identifier
<
/k
e
y
>
<
string
>
WC72QNYT4F
<
/string
>
<
k
e
y
>
get-task-allow
<
/k
e
y
>
<
fa
ls
e
/
>
<
k
e
y
>
keychain-access-groups
<
/k
e
y
>
<
a
rr
a
y
>
<
string
>
WC72QNYT4F.com.ridingapp.sunarc.notification
<
/string
>
<
/
a
rr
a
y
>
<
/
d
i
c
t
>
<
k
e
y
>
name
<
/k
e
y
>
<
string
>
AudioNotification.appex
<
/string
>
<
k
e
y
>
profile
<
/k
e
y
>
<
d
i
c
t
>
<
k
e
y
>
UUID
<
/k
e
y
>
<
string
>
7c9dc39e-151f-4eba-9815-2aae7e3d2e8d
<
/string
>
<
k
e
y
>
name
<
/k
e
y
>
<
string
>
RidingAppExt
<
/string
>
<
/
d
i
c
t
>
<
k
e
y
>
team
<
/k
e
y
>
<
d
i
c
t
>
<
k
e
y
>
id
<
/k
e
y
>
<
string
>
WC72QNYT4F
<
/string
>
<
k
e
y
>
name
<
/k
e
y
>
<
string
>
SUNARC
TECHNOLOGIES
PRIVATE
LIMITED
<
/string
>
<
/
d
i
c
t
>
<
/
d
i
c
t
>
<
/
a
rr
a
y
>
<
k
e
y
>
entitlements
<
/k
e
y
>
<
d
i
c
t
>
<
k
e
y
>
application-identifier
<
/k
e
y
>
<
string
>
WC72QNYT4F.com.ridingapp.sunarc
<
/string
>
<
k
e
y
>
com.apple.developer.team-identifier
<
/k
e
y
>
<
string
>
WC72QNYT4F
<
/string
>
<
k
e
y
>
get-task-allow
<
/k
e
y
>
<
fa
ls
e
/
>
<
k
e
y
>
keychain-access-groups
<
/k
e
y
>
<
a
rr
a
y
>
<
string
>
WC72QNYT4F.com.ridingapp.sunarc
<
/string
>
<
/
a
rr
a
y
>
<
/
d
i
c
t
>
<
k
e
y
>
name
<
/k
e
y
>
<
string
>
Riding
App.app
<
/string
>
<
k
e
y
>
profile
<
/k
e
y
>
<
d
i
c
t
>
<
k
e
y
>
UUID
<
/k
e
y
>
<
string
>
4cb40185-51be-4d68-83a5-54e0582a8ac0
<
/string
>
<
k
e
y
>
name
<
/k
e
y
>
<
string
>
Riding_AdHoc
<
/string
>
<
/
d
i
c
t
>
<
k
e
y
>
team
<
/k
e
y
>
<
d
i
c
t
>
<
k
e
y
>
id
<
/k
e
y
>
<
string
>
WC72QNYT4F
<
/string
>
<
k
e
y
>
name
<
/k
e
y
>
<
string
>
SUNARC
TECHNOLOGIES
PRIVATE
LIMITED
<
/string
>
<
/
d
i
c
t
>
<
/
d
i
c
t
>
<
/
a
rr
a
y
>
<
/
d
i
c
t
>
<
/plist
>
Bhagyashree/Sunarc/Controller/Appointment/Riding App 2018-09-10 10-22-25/ExportOptions.plist
0 → 100644
View file @
6a925671
<
?xml
v
e
rsion="
1
.
0
"
e
n
c
o
d
ing="UT
F
-
8
"?
>
<
!
D
O
C
TYP
E
plist
PU
B
LI
C
"-//
A
ppl
e
//
D
T
D
PLIST
1
.
0
//
E
N"
"http://www.
a
ppl
e
.
c
om/
D
T
D
s/Prop
e
rtyList-
1
.
0
.
d
t
d
"
>
<
plist
v
e
rsion="
1
.
0
"
>
<
d
i
c
t
>
<
k
e
y
>
compileBitcode
<
/k
e
y
>
<
fa
ls
e
/
>
<
k
e
y
>
method
<
/k
e
y
>
<
string
>
ad-hoc
<
/string
>
<
k
e
y
>
provisioningProfiles
<
/k
e
y
>
<
d
i
c
t
>
<
k
e
y
>
com.ridingapp.sunarc
<
/k
e
y
>
<
string
>
Riding_AdHoc
<
/string
>
<
k
e
y
>
com.ridingapp.sunarc.notification
<
/k
e
y
>
<
string
>
RidingAppExt
<
/string
>
<
/
d
i
c
t
>
<
k
e
y
>
signingCertificate
<
/k
e
y
>
<
string
>
iPhone
Distribution
<
/string
>
<
k
e
y
>
signingStyle
<
/k
e
y
>
<
string
>
manual
<
/string
>
<
k
e
y
>
stripSwiftSymbols
<
/k
e
y
>
<
tru
e
/
>
<
k
e
y
>
teamID
<
/k
e
y
>
<
string
>
WC72QNYT4F
<
/string
>
<
k
e
y
>
thinning
<
/k
e
y
>
<
string
>
&
lt
;
none
&
gt
;
<
/string
>
<
/
d
i
c
t
>
<
/plist
>
Bhagyashree/Sunarc/Controller/Appointment/Riding App 2018-09-10 10-22-25/Packaging.log
0 → 100644
View file @
6a925671
This source diff could not be displayed because it is too large. You can
view the blob
instead.
Bhagyashree/Sunarc/Controller/Appointment/Riding App 2018-09-10 10-22-25/Riding App.ipa
0 → 100644
View file @
6a925671
File added
Bhagyashree/Sunarc/Controller/Appointment/ServiceDetailViewController.swift
View file @
6a925671
...
...
@@ -40,7 +40,6 @@ class ServiceDetailViewController: UIViewController {
appointment
.
getAppointmentDetails
(
incrementId
:
incrementId
,
success
:
{
if
self
.
appointment
.
orderStatus
==
"Service Upload Result"
{
self
.
serviceStatus
=
.
uploadResult
}
else
if
self
.
appointment
.
orderStatus
==
"Processing"
{
...
...
@@ -255,14 +254,41 @@ class CustomerDetailCell: UITableViewCell {
var
status
:
ServiceStatus
?
{
didSet
{
if
let
status
=
status
{
if
status
==
.
completed
{
imgStatus
.
image
=
UIImage
(
named
:
"status-done"
)
}
else
if
status
==
.
ongoing
{
imgStatus
.
image
=
UIImage
(
named
:
"status-inprogress"
)
}
else
{
imgStatus
.
image
=
UIImage
(
named
:
"status-tbc"
)
switch
status
{
case
.
tbc
:
self
.
imgStatus
.
image
=
UIImage
(
named
:
"tbc"
)
case
.
ongoing
:
self
.
imgStatus
.
image
=
UIImage
(
named
:
"status-inprogress"
)
case
.
completed
:
self
.
imgStatus
.
image
=
UIImage
(
named
:
"status-done"
)
case
.
uploadResult
:
self
.
imgStatus
.
image
=
UIImage
(
named
:
"status-inprogress"
)
case
.
processing
:
self
.
imgStatus
.
image
=
UIImage
(
named
:
"tbc"
)
}
}
// switch status {
// case .CANCELED:
// self.imgStatus.image = nil
// case .CLOSED:
// self.imgStatus.image = UIImage(named: "status-done")
// case .COMPLETE:
// self.imgStatus.image = UIImage(named: "status-done")
// case .PENDING:
// self.imgStatus.image = UIImage(named: "status-tbc")
// case .PROCESSING:
// self.imgStatus.image = UIImage(named: "tbc")
// case .SERVICE_COMPLETE:
// self.imgStatus.image = UIImage(named: "status-done")
// case .SERVICE_ONGOING:
// self.imgStatus.image = UIImage(named: "status-inprogress")
// case .SERVICE_UPLOAD_RESULT:
// self.imgStatus.image = UIImage(named: "status-inprogress")
// case .ONGOING:
// self.imgStatus.image = UIImage(named: "status-inprogress")
// }
}
}
...
...
Bhagyashree/Sunarc/Controller/Appointment/ServicesListViewController.swift
View file @
6a925671
...
...
@@ -121,6 +121,7 @@ extension ServicesListViewController: UITableViewDelegate, UITableViewDataSource
let
chatViewController
=
Utils
.
viewController
(
storyboardName
:
"Home"
,
ofType
:
OnlineEnquiryViewController
.
self
)
if
let
orderId
=
selectedService
.
orderId
{
chatViewController
.
orderId
=
orderId
chatViewController
.
customerId
=
selectedService
.
customerId
!
self
.
navigationController
?
.
pushViewController
(
chatViewController
,
animated
:
true
)
}
}
else
{
...
...
Bhagyashree/Sunarc/Controller/Home/EnquiryDetailsViewController.swift
View file @
6a925671
...
...
@@ -42,6 +42,7 @@ extension EnquiryDetailsViewController {
chatViewController
.
isOrderCompleted
=
true
chatViewController
.
customerProfileImage
=
appointmentDetails
.
customerProfileImage
chatViewController
.
customerName
=
appointmentDetails
.
customerName
!
chatViewController
.
customerId
=
appointmentDetails
.
customerId
!
self
.
navigationController
?
.
pushViewController
(
chatViewController
,
animated
:
true
)
}
...
...
Bhagyashree/Sunarc/Controller/Home/HomePageViewController.swift
View file @
6a925671
...
...
@@ -14,26 +14,37 @@ import FirebaseDatabase
class
HomePageViewController
:
BaseViewController
{
let
dashboard
=
Dashboard
()
var
isThereAnyUnreadMessage
=
false
@IBOutlet
var
tblSellerDashbord
:
UITableView
!
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
let
ref
=
Database
.
database
()
.
reference
()
.
child
(
"seller
s
"
)
let
ref
=
Database
.
database
()
.
reference
()
.
child
(
"seller
"
)
.
child
(
"
\(
User
.
customerId
)
"
)
ref
.
observe
(
DataEventType
.
value
)
{
(
snapshot
)
in
let
postDict
=
snapshot
.
value
as?
[
String
:
AnyObject
]
??
[:]
if
let
status
=
postDict
[
"
\(
User
.
customerId
)
"
]
as?
String
{
if
status
==
"offline"
{
User
.
isOnline
=
false
}
else
{
User
.
isOnline
=
true
if
let
postDict
=
snapshot
.
value
as?
[
String
:
AnyObject
]
{
if
let
status
=
postDict
[
"userStatus"
]
as?
String
{
if
status
==
"offline"
{
User
.
isOnline
=
false
}
else
{
User
.
isOnline
=
true
}
}
self
.
isThereAnyUnreadMessage
=
false
if
let
chatCountIds
=
postDict
[
"chatCountId"
]
as?
String
{
if
chatCountIds
.
count
>
0
{
if
chatCountIds
.
components
(
separatedBy
:
","
)
.
count
>
0
{
self
.
isThereAnyUnreadMessage
=
true
}
}
}
self
.
tblSellerDashbord
.
reloadData
()
}
}
Database
.
database
()
.
reference
()
.
child
(
"seller
s"
)
.
onDisconnectSetValue
([
"
\(
User
.
customerId
)
"
:
"offline"
]
)
Database
.
database
()
.
reference
()
.
child
(
"seller
"
)
.
child
(
"
\(
User
.
customerId
)
"
)
.
child
(
"userStatus"
)
.
onDisconnectSetValue
(
"offline"
)
let
headerForLoading
=
MJRefreshNormalHeader
{
...
...
@@ -102,6 +113,14 @@ extension HomePageViewController: UITableViewDelegate, UITableViewDataSource {
cell
.
sellerImage
.
kf
.
setImage
(
with
:
url
,
placeholder
:
UIImage
(
named
:
"placeholder"
),
options
:
[
.
transition
(
ImageTransition
.
fade
(
1
)),
.
scaleFactor
(
1.0
)],
progressBlock
:
nil
,
completionHandler
:
nil
)
}
if
isThereAnyUnreadMessage
==
true
{
cell
.
imgUnreadMsg
.
image
=
UIImage
(
named
:
"email"
)
}
else
{
cell
.
imgUnreadMsg
.
image
=
UIImage
(
named
:
"email-box"
)
}
cell
.
lblStatus
.
text
=
User
.
isOnline
==
true
?
"Online"
:
"Offline"
cell
.
switchMode
.
setOn
(
User
.
isOnline
,
animated
:
true
)
return
cell
...
...
@@ -141,6 +160,7 @@ extension HomePageViewController: UITableViewDelegate, UITableViewDataSource {
let
chatViewController
=
Utils
.
viewController
(
storyboardName
:
"Home"
,
ofType
:
OnlineEnquiryViewController
.
self
)
if
let
orderId
=
order
.
orderId
{
chatViewController
.
orderId
=
orderId
chatViewController
.
customerId
=
order
.
customerDetail
.
customerId
!
self
.
navigationController
?
.
pushViewController
(
chatViewController
,
animated
:
true
)
}
}
else
{
...
...
@@ -195,6 +215,7 @@ class SellerProfileCell: UITableViewCell {
@IBOutlet
var
lblThisWeekIncome
:
UILabel
!
@IBOutlet
var
lblThisMonthTransection
:
UILabel
!
@IBOutlet
var
lblThisMonthIncome
:
UILabel
!
@IBOutlet
var
imgUnreadMsg
:
UIImageView
!
var
delegate
:
SellerProfileCellDelegate
!
...
...
@@ -206,12 +227,10 @@ class SellerProfileCell: UITableViewCell {
@IBAction
func
goToOnlineOffline
(
statusSwitch
:
UISwitch
)
{
if
statusSwitch
.
isOn
==
true
{
Dashboard
.
goOnlineOffline
(
status
:
true
,
success
:
{
Database
.
database
()
.
reference
()
.
child
(
"seller
s"
)
.
setValue
([
"
\(
User
.
customerId
)
"
:
"online"
]
)
Database
.
database
()
.
reference
()
.
child
(
"seller
"
)
.
child
(
"
\(
User
.
customerId
)
"
)
.
child
(
"userStatus"
)
.
setValue
(
"online"
)
self
.
delegate
.
showToast
(
message
:
"You are now online"
)
self
.
lblStatus
.
text
=
"Online"
})
{
(
message
)
in
...
...
@@ -221,9 +240,8 @@ class SellerProfileCell: UITableViewCell {
}
else
{
Dashboard
.
goOnlineOffline
(
status
:
false
,
success
:
{
Database
.
database
()
.
reference
()
.
child
(
"seller
s"
)
.
setValue
([
"
\(
User
.
customerId
)
"
:
"offline"
]
)
Database
.
database
()
.
reference
()
.
child
(
"seller
"
)
.
child
(
"
\(
User
.
customerId
)
"
)
.
child
(
"userStatus"
)
.
setValue
(
"offline"
)
self
.
delegate
.
showToast
(
message
:
"You are now offline"
)
self
.
lblStatus
.
text
=
"Offline"
})
{
(
message
)
in
...
...
Bhagyashree/Sunarc/Controller/Home/OngoingEnquiryViewController.swift
View file @
6a925671
...
...
@@ -109,6 +109,7 @@ extension OngoingEnquiryViewController: UITableViewDataSource, UITableViewDelega
chatViewController
.
orderId
=
orderId
chatViewController
.
customerProfileImage
=
enquiry
.
enquiries
[
indexPath
.
row
]
.
customerProfileImage
chatViewController
.
customerName
=
enquiry
.
enquiries
[
indexPath
.
row
]
.
customerName
!
chatViewController
.
customerId
=
enquiry
.
enquiries
[
indexPath
.
row
]
.
customerId
self
.
navigationController
?
.
pushViewController
(
chatViewController
,
animated
:
true
)
}
}
...
...
Bhagyashree/Sunarc/Controller/Home/OnlineEnquiryViewController.swift
View file @
6a925671
...
...
@@ -28,11 +28,14 @@ class OnlineEnquiryViewController: UIViewController {
var
isViewVisable
=
true
var
customerProfileImage
:
String
?
var
customerName
:
String
=
""
var
customerId
:
String
?
=
""
var
chatCountId
=
""
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
lblCustomerName
.
text
=
customerName
ref
=
Database
.
database
()
.
reference
()
.
child
(
orderId
)
ref
.
queryOrdered
(
byChild
:
"timestamp"
)
.
observe
(
DataEventType
.
value
,
with
:
{
(
snapshot
)
in
self
.
chats
=
[
Chat
]()
...
...
@@ -52,6 +55,17 @@ class OnlineEnquiryViewController: UIViewController {
}
})
Database
.
database
()
.
reference
()
.
child
(
"seller"
)
.
child
(
"
\(
User
.
customerId
)
"
)
.
observe
(
DataEventType
.
value
)
{
(
snapshot
)
in
if
let
dict
=
snapshot
.
value
as?
[
String
:
Any
]
{
self
.
chatCountId
=
dict
[
"chatCountId"
]
as?
String
??
""
}
// in seller app will remove customer id
Database
.
database
()
.
reference
()
.
child
(
"seller"
)
.
child
(
"
\(
User
.
customerId
)
"
)
.
child
(
"chatCountId"
)
.
setValue
(
self
.
removeCustomerIdFromCSV
())
}
if
isOrderCompleted
==
true
{
chatInputView
.
isHidden
=
true
btnEndService
.
isHidden
=
true
...
...
@@ -104,8 +118,26 @@ extension OnlineEnquiryViewController {
])
txtComment
.
text
=
""
}
func
removeCustomerIdFromCSV
()
->
String
{
var
customerIds
=
""
for
customerId
in
chatCountId
.
components
(
separatedBy
:
","
)
{
if
customerId
!=
customerId
{
customerIds
+=
customerId
+
","
}
}
if
customerIds
.
count
>
0
{
customerIds
.
removeLast
()
}
return
customerIds
}
@IBAction
func
endService
()
{
let
alerController
=
UIAlertController
(
title
:
""
,
message
:
"Is the service finished?"
,
preferredStyle
:
.
alert
)
...
...
Bhagyashree/Sunarc/Controller/Me/ChangePasswordViewController.swift
View file @
6a925671
...
...
@@ -32,9 +32,14 @@ class ChangePasswordViewController: UIViewController {
User
.
changePassword
(
oldPassword
:
txtCurrentPassword
.
text
!
,
newPassword
:
txtNewPassword
.
text
!
,
success
:
{
print
(
"success"
)
User
.
clearData
()
let
loginVc
=
Utils
.
viewController
(
storyboardName
:
"Fengshui"
,
ofType
:
LoginViewController
.
self
)
self
.
present
(
loginVc
,
animated
:
true
,
completion
:
nil
)
})
{
(
errorMessage
)
in
print
(
errorMessag
e
)
self
.
view
.
showToast
(
errorMessage
,
position
:
.
bottom
,
popTime
:
2.0
,
dismissOnTap
:
fals
e
)
}
}
...
...
Bhagyashree/Sunarc/Controller/Me/MyAllServiceOrderViewController.swift
View file @
6a925671
...
...
@@ -115,6 +115,7 @@ extension MyAllServiceOrderViewController: UITableViewDelegate, UITableViewDataS
let
chatViewController
=
Utils
.
viewController
(
storyboardName
:
"Home"
,
ofType
:
OnlineEnquiryViewController
.
self
)
if
let
orderId
=
selectedService
.
orderId
{
chatViewController
.
orderId
=
orderId
chatViewController
.
customerId
=
selectedService
.
customerId
!
self
.
navigationController
?
.
pushViewController
(
chatViewController
,
animated
:
true
)
}
}
else
{
...
...
Bhagyashree/Sunarc/Controller/Me/MyCompletedOrdersViewController.swift
View file @
6a925671
...
...
@@ -114,6 +114,7 @@ extension MyCompletedOrdersViewController: UITableViewDelegate, UITableViewDataS
let
chatViewController
=
Utils
.
viewController
(
storyboardName
:
"Home"
,
ofType
:
OnlineEnquiryViewController
.
self
)
if
let
orderId
=
selectedService
.
orderId
{
chatViewController
.
orderId
=
orderId
chatViewController
.
customerId
=
selectedService
.
customerId
!
self
.
navigationController
?
.
pushViewController
(
chatViewController
,
animated
:
true
)
}
}
else
{
...
...
Bhagyashree/Sunarc/Controller/Me/MyOngoingServiceOrderViewController.swift
View file @
6a925671
...
...
@@ -121,6 +121,7 @@ extension MyOngoingServiceOrderViewController: UITableViewDelegate, UITableViewD
let
chatViewController
=
Utils
.
viewController
(
storyboardName
:
"Home"
,
ofType
:
OnlineEnquiryViewController
.
self
)
if
let
orderId
=
selectedService
.
orderId
{
chatViewController
.
orderId
=
orderId
chatViewController
.
customerId
=
selectedService
.
customerId
!
self
.
navigationController
?
.
pushViewController
(
chatViewController
,
animated
:
true
)
}
}
else
{
...
...
Bhagyashree/Sunarc/Controller/Me/MyUploadResultViewController.swift
View file @
6a925671
...
...
@@ -114,6 +114,7 @@ extension MyUploadResultViewController: UITableViewDelegate, UITableViewDataSour
let
chatViewController
=
Utils
.
viewController
(
storyboardName
:
"Home"
,
ofType
:
OnlineEnquiryViewController
.
self
)
if
let
orderId
=
selectedService
.
orderId
{
chatViewController
.
orderId
=
orderId
chatViewController
.
customerId
=
selectedService
.
customerId
!
self
.
navigationController
?
.
pushViewController
(
chatViewController
,
animated
:
true
)
}
}
else
{
...
...
Bhagyashree/Sunarc/Controller/Messages/NotificationsViewController.swift
View file @
6a925671
...
...
@@ -7,30 +7,72 @@
//
import
UIKit
import
MJRefresh
class
NotificationsViewController
:
BaseViewController
{
var
notification
=
MyNotification
()
@IBOutlet
var
tblNotification
:
UITableView
!
var
footerForLoading
:
MJRefreshAutoNormalFooter
!
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
self
.
setupRefreshHeaderFooter
()
}
override
func
viewWillAppear
(
_
animated
:
Bool
)
{
super
.
viewWillAppear
(
animated
)
notification
.
getNotifications
({
self
.
tblNotification
.
reloadData
()
})
{
(
errorMessage
)
in
if
errorMessage
!=
nil
{
self
.
view
.
showToast
(
errorMessage
!
,
position
:
.
bottom
,
popTime
:
2.0
,
dismissOnTap
:
false
)
}
override
func
viewDidAppear
(
_
animated
:
Bool
)
{
super
.
viewDidAppear
(
animated
)
if
notification
.
notifications
.
count
==
0
{
tblNotification
.
mj_header
.
beginRefreshing
()
}
}
func
setupRefreshHeaderFooter
()
{
let
headerForLoading
=
MJRefreshNormalHeader
{
self
.
notifications
(
nextPage
:
false
)
}
headerForLoading
?
.
activityIndicatorViewStyle
=
.
gray
headerForLoading
?
.
lastUpdatedTimeLabel
.
isHidden
=
true
headerForLoading
?
.
stateLabel
.
isHidden
=
true
tblNotification
.
mj_header
=
headerForLoading
footerForLoading
=
MJRefreshAutoNormalFooter
{
self
.
notifications
(
nextPage
:
true
)
}
footerForLoading
.
isRefreshingTitleHidden
=
true
footerForLoading
.
activityIndicatorViewStyle
=
.
gray
footerForLoading
.
stateLabel
.
isHidden
=
true
tblNotification
.
mj_footer
=
footerForLoading
}
func
notifications
(
nextPage
:
Bool
)
{
if
nextPage
==
true
{
notification
.
nextPage
(
success
:
{
self
.
tblNotification
.
reloadData
()
self
.
tblNotification
.
mj_footer
.
endRefreshing
()
})
{
(
message
)
in
self
.
tblNotification
.
mj_footer
.
endRefreshing
()
self
.
view
.
showToast
(
message
,
position
:
.
bottom
,
popTime
:
2.0
,
dismissOnTap
:
false
)
}
}
else
{
notification
.
getFollwers
(
success
:
{
self
.
tblNotification
.
reloadData
()
self
.
tblNotification
.
mj_header
.
endRefreshing
()
})
{
(
message
)
in
self
.
view
.
showToast
(
message
,
position
:
.
bottom
,
popTime
:
2.0
,
dismissOnTap
:
false
)
self
.
tblNotification
.
mj_header
.
endRefreshing
()
}
}
}
}
extension
NotificationsViewController
:
UITableViewDataSource
,
UITableViewDelegate
{
...
...
@@ -45,11 +87,11 @@ extension NotificationsViewController: UITableViewDataSource, UITableViewDelegat
return
ongoinCell
}
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
let
serviceDetail
=
Utils
.
viewController
(
storyboardName
:
"Appointment"
,
ofType
:
ServiceDetailViewController
.
self
)
serviceDetail
.
serviceStatus
=
.
tbc
self
.
navigationController
?
.
pushViewController
(
serviceDetail
,
animated
:
true
)
}
//
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
//
let serviceDetail = Utils.viewController(storyboardName: "Appointment", ofType: ServiceDetailViewController.self)
//
serviceDetail.serviceStatus = .tbc
//
self.navigationController?.pushViewController(serviceDetail, animated: true)
//
}
}
...
...
Bhagyashree/Sunarc/Model/Appointment/Appointment.swift
View file @
6a925671
...
...
@@ -12,6 +12,7 @@ import Foundation
class
Appointment
{
var
customerName
:
String
?
var
customerId
:
String
?
var
customerProfileImage
:
String
?
var
incrementId
:
String
?
var
DOB
:
String
?
...
...
@@ -34,7 +35,10 @@ class Appointment {
func
initWithJSON
(
json
:
Any
)
{
print
(
json
)
if
let
response
=
json
as?
[
String
:
Any
]
{
self
.
customerId
=
response
[
"customer_Id"
]
as?
String
self
.
customerName
=
response
[
"buyerName"
]
as?
String
self
.
customerProfileImage
=
response
[
"buyerProfileImage"
]
as?
String
self
.
incrementId
=
response
[
"incrementId"
]
as?
String
...
...
@@ -129,16 +133,34 @@ class Appointment {
var
timing
:
String
{
get
{
if
self
.
bookingFrom
!=
nil
&&
self
.
bookingTill
!=
nil
{
return
self
.
bookingFrom
!
+
"-"
+
self
.
bookingTill
!
// TO DO
if
self
.
bookingFrom
==
nil
||
self
.
bookingTill
==
nil
{
return
""
}
let
dateComponents
=
self
.
bookingFrom
?
.
components
(
separatedBy
:
","
)
let
dateComponentsBookingTill
=
self
.
bookingTill
?
.
components
(
separatedBy
:
","
)
var
bookingDate
=
""
if
dateComponents
!.
count
>
0
{
bookingDate
+=
dateComponents
!
[
0
]
}
if
self
.
bookingFrom
!=
nil
{
return
self
.
bookingFrom
!
if
dateComponents
!.
count
>
1
{
bookingDate
+=
dateComponents
!
[
1
]
}
if
self
.
bookingTill
!=
nil
{
return
self
.
bookingFrom
!
var
bookingFromsSlot
=
""
var
bookingTillSlot
=
""
if
dateComponents
!.
count
>
2
{
bookingFromsSlot
=
dateComponents
!
[
2
]
}
if
dateComponentsBookingTill
!.
count
>
2
{
bookingTillSlot
=
dateComponentsBookingTill
!
[
2
]
}
return
""
return
bookingDate
+
","
+
bookingFromsSlot
+
"-"
+
bookingTillSlot
}
}
...
...
Bhagyashree/Sunarc/Model/Appointment/AppointmentExt.swift
View file @
6a925671
...
...
@@ -22,8 +22,6 @@ extension Appointment {
HTTP
()
.
connectionWithRequestObjectFormUrl
(
api
:
API
.
VIEW_ORDER
,
parameters
:
parameters
,
method
:
.
post
,
indicator
:
true
,
success
:
{
(
response
)
in
print
(
response
)
if
let
validJSON
=
response
as?
[
String
:
Any
]
{
self
.
initWithJSON
(
json
:
validJSON
)
success
()
...
...
Bhagyashree/Sunarc/Model/Home/Enquiry/Enquiry.swift
View file @
6a925671
...
...
@@ -24,6 +24,7 @@ class Enquiry {
var
orderId
:
String
?
var
incrementId
:
String
?
var
customerName
:
String
?
var
customerId
:
String
?
var
customerProfileImage
:
String
?
var
enquiryFor
=
EnquiryStatus
.
PROCESSING
...
...
@@ -33,6 +34,9 @@ class Enquiry {
func
initWithJSON
(
json
:
Any
)
{
print
(
json
)
if
let
response
=
json
as?
[
String
:
Any
]
{
self
.
bookingTill
=
response
[
"Booking Till"
]
as?
String
self
.
orderId
=
response
[
"orderId"
]
as?
String
...
...
@@ -43,6 +47,7 @@ class Enquiry {
if
let
customerDetails
=
response
[
"customerDetails"
]
as?
[
String
:
Any
]
{
self
.
customerName
=
customerDetails
[
"name"
]
as?
String
self
.
customerId
=
customerDetails
[
"customer_id"
]
as?
String
self
.
customerProfileImage
=
customerDetails
[
"profile_image"
]
as?
String
}
...
...
Bhagyashree/Sunarc/Model/Home/HomeScreen/Customer.swift
View file @
6a925671
...
...
@@ -14,14 +14,17 @@ class Customer {
var
profileImage
:
String
?
var
baseTotal
:
String
?
var
purchaseTotal
:
String
?
var
customerId
:
String
?
func
initWithJSON
(
json
:
Any
)
{
if
let
response
=
json
as?
[
String
:
Any
]
{
self
.
name
=
response
[
"name"
]
as?
String
self
.
date
=
response
[
"date"
]
as?
String
self
.
profileImage
=
response
[
"profile_image"
]
as?
String
self
.
baseTotal
=
response
[
"baseTotal"
]
as?
String
self
.
purchaseTotal
=
response
[
"purchaseTotal"
]
as?
String
self
.
customerId
=
response
[
"customer_id"
]
as?
String
}
}
}
Bhagyashree/Sunarc/Model/Me/Service.swift
View file @
6a925671
...
...
@@ -31,6 +31,7 @@ class Service {
var
bookingTill
:
String
?
var
BOD
:
String
?
var
customerName
:
String
?
var
customerId
:
String
?
var
customerProfileImage
:
String
?
var
customerDate
:
String
?
var
baseTotal
:
String
?
...
...
@@ -47,6 +48,8 @@ class Service {
func
initWithJSON
(
json
:
[
String
:
Any
])
{
print
(
json
)
if
let
status
=
json
[
"status"
]
as?
String
{
self
.
status
=
MyServiceStatus
(
rawValue
:
status
)
!
}
...
...
@@ -57,6 +60,7 @@ class Service {
if
let
productInfo
=
productsInfo
.
first
{
self
.
productName
=
productInfo
[
"name"
]
as?
String
self
.
productId
=
productInfo
[
"productId"
]
as?
String
self
.
customerId
=
productInfo
[
"customer_id"
]
as?
String
if
let
categoryType_
=
productInfo
[
"category_type"
]
as?
String
{
self
.
categoryType
=
CategoryType
(
rawValue
:
categoryType_
)
!
...
...
Bhagyashree/Sunarc/Model/Notifications/MyNotification.swift
View file @
6a925671
...
...
@@ -19,6 +19,9 @@ class MyNotification {
var
notificationType
:
String
?
var
title
:
String
?
var
maxRecords
:
Int
=
0
var
currentPage
:
Int
=
1
var
notifications
=
[
MyNotification
]()
func
initWithJSON
(
json
:
[
String
:
Any
])
{
...
...
Bhagyashree/Sunarc/Model/Notifications/MyNotificationExt.swift
View file @
6a925671
...
...
@@ -11,13 +11,33 @@ import Foundation
extension
MyNotification
{
func
getNotifications
(
_
success
:
@escaping
()
->
Void
,
failur
:
@escaping
(
_
errorMessage
:
String
?)
->
Void
)
{
func
getFollwers
(
success
:
@escaping
()
->
Void
,
failuer
:
@escaping
(
_
message
:
String
)
->
Void
)
{
self
.
currentPage
=
1
self
.
notifications
=
[
MyNotification
]()
self
.
getNotificationsForPage
(
success
,
failur
:
failuer
)
}
func
nextPage
(
success
:
@escaping
()
->
Void
,
failuer
:
@escaping
(
_
message
:
String
)
->
Void
)
{
if
self
.
notifications
.
count
>=
self
.
maxRecords
{
failuer
(
"No more records"
)
return
}
self
.
currentPage
=
self
.
currentPage
+
1
self
.
getNotificationsForPage
(
success
,
failur
:
failuer
)
}
private
func
getNotificationsForPage
(
_
success
:
@escaping
()
->
Void
,
failur
:
@escaping
(
_
message
:
String
)
->
Void
)
{
let
parameters
:
[
String
:
Any
]
=
[
"storeId"
:
UserDefaults
.
standard
.
value
(
forKey
:
"storeId"
)
as!
String
,
"customerId"
:
User
.
customerId
"customerId"
:
User
.
customerId
,
"page"
:
self
.
currentPage
]
HTTP
()
.
connectionWithRequestObjectFormUrl
(
api
:
API
.
NOTIFICATION
,
parameters
:
parameters
,
method
:
.
post
,
indicator
:
true
,
success
:
{
(
response
)
in
HTTP
()
.
connectionWithRequestObjectFormUrl
(
api
:
API
.
NOTIFICATION
,
parameters
:
parameters
,
method
:
.
post
,
indicator
:
false
,
success
:
{
(
response
)
in
print
(
response
)
if
let
json
=
response
as?
[
String
:
Any
]
{
if
let
notificationList
=
json
[
"notificationList"
]
as?
[[
String
:
Any
]]
{
...
...
@@ -31,11 +51,15 @@ extension MyNotification {
success
()
}
else
{
failur
(
nil
)
failur
(
"Try again"
)
}
if
let
totalCount
=
json
[
"totalCount"
]
as?
Int
{
self
.
maxRecords
=
totalCount
}
}
else
{
failur
(
nil
)
failur
(
"Try again"
)
}
...
...
Bhagyashree/Sunarc/Model/UserExt.swift
View file @
6a925671
...
...
@@ -239,7 +239,29 @@ extension User {
let
paramenters
=
[
"currentPassword"
:
oldPassword
,
"newPassword"
:
newPassword
]
HTTP
()
.
connectionWithRequestObject
(
api
:
API
.
CHANGE_PASWORD
,
parameters
:
paramenters
,
method
:
.
put
,
indicator
:
true
,
success
:
{
(
response
)
in
print
(
response
)
if
let
isSuccess
=
response
as?
Bool
{
if
isSuccess
==
true
{
success
()
}
else
{
failure
(
"Try again"
)
}
}
else
{
if
let
dict
=
response
as?
[
String
:
Any
]
{
if
let
message
=
dict
[
"message"
]
as?
String
{
failure
(
message
)
}
else
{
failure
(
"Try again"
)
}
}
else
{
failure
(
"Try again"
)
}
}
})
{
(
errorMessage
)
in
failure
(
errorMessage
)
}
...
...
Bhagyashree/Sunarc/Other/HTTP/HTTP.swift
View file @
6a925671
...
...
@@ -77,7 +77,6 @@ class HTTP: NSObject {
SVProgressHUD
.
dismiss
()
UIApplication
.
shared
.
isNetworkActivityIndicatorVisible
=
false
print
(
response
)
if
response
.
response
==
nil
{
failure
(
"No network found"
)
}
...
...
@@ -110,8 +109,9 @@ class HTTP: NSObject {
HTTP
()
.
connectionWithRequestObject
(
api
:
api
,
parameters
:
parameters
,
method
:
method
,
indicator
:
indicator
,
success
:
success
,
failure
:
failure
)
}
}
}
else
{
success
(
response
.
result
.
value
!
)
}
}
}
else
{
...
...
Bhagyashree/Sunarc/View/Appointment.storyboard
View file @
6a925671
...
...
@@ -2594,7 +2594,7 @@
</connections>
</tableView>
</subviews>
<color
key=
"backgroundColor"
white=
"1"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"genericGamma22GrayColorSpace
"
/>
<color
key=
"backgroundColor"
red=
"0.89019607840000003"
green=
"0.97254901959999995"
blue=
"0.99607843139999996"
alpha=
"0.50464469180000004"
colorSpace=
"calibratedRGB
"
/>
<constraints>
<constraint
firstItem=
"37g-wV-xCA"
firstAttribute=
"bottom"
secondItem=
"Pk4-Ne-5Ef"
secondAttribute=
"bottom"
id=
"MGv-cH-x01"
/>
<constraint
firstItem=
"37g-wV-xCA"
firstAttribute=
"trailing"
secondItem=
"Pk4-Ne-5Ef"
secondAttribute=
"trailing"
id=
"qRh-1n-2i8"
/>
...
...
Bhagyashree/Sunarc/View/Home.storyboard
View file @
6a925671
...
...
@@ -53,7 +53,7 @@
<action
selector=
"goToOnlineOfflineWithStatusSwitch:"
destination=
"IQN-b7-9c3"
eventType=
"valueChanged"
id=
"dzg-xp-xHm"
/>
</connections>
</switch>
<imageView
userInteractionEnabled=
"NO"
contentMode=
"scaleAspectFit"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
image=
"email"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"iBc-qO-d0E"
>
<imageView
userInteractionEnabled=
"NO"
contentMode=
"scaleAspectFit"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
image=
"email
-box
"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"iBc-qO-d0E"
>
<rect
key=
"frame"
x=
"335"
y=
"5"
width=
"32"
height=
"28"
/>
<constraints>
<constraint
firstAttribute=
"height"
constant=
"28"
id=
"AGH-gH-Nqm"
/>
...
...
@@ -365,6 +365,7 @@
</constraints>
</tableViewCellContentView>
<connections>
<outlet
property=
"imgUnreadMsg"
destination=
"iBc-qO-d0E"
id=
"eFk-9l-7zF"
/>
<outlet
property=
"lblSellerName"
destination=
"rzY-FX-CaY"
id=
"9dD-eo-HjZ"
/>
<outlet
property=
"lblSellerTitle"
destination=
"4Hi-PZ-J2X"
id=
"MVS-B4-83Y"
/>
<outlet
property=
"lblStatus"
destination=
"hHp-qg-oek"
id=
"XGM-si-MFw"
/>
...
...
@@ -1824,7 +1825,7 @@
<resources>
<image
name=
"back"
width=
"18"
height=
"31"
/>
<image
name=
"border"
width=
"228"
height=
"228"
/>
<image
name=
"email
"
width=
"57
"
height=
"34"
/>
<image
name=
"email
-box"
width=
"50
"
height=
"34"
/>
<image
name=
"emptyStar"
width=
"15"
height=
"15"
/>
<image
name=
"home"
width=
"25"
height=
"25"
/>
<image
name=
"placeholder"
width=
"140"
height=
"144"
/>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment