Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
getme
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
amal
getme
Commits
f16fa4a5
Commit
f16fa4a5
authored
Mar 06, 2020
by
Adarsh K
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'adarsh' into 'master'
new changes See merge request
!87
parents
9c39a2ca
0e5d75cc
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
60 additions
and
7 deletions
+60
-7
app.component.html
src/app/app.component.html
+2
-2
app.component.ts
src/app/app.component.ts
+25
-1
productdetail.page.ts
src/app/productdetail/productdetail.page.ts
+12
-3
order.service.ts
src/config/order.service.ts
+3
-1
service.service.ts
src/config/service.service.ts
+18
-0
No files found.
src/app/app.component.html
View file @
f16fa4a5
...
...
@@ -85,11 +85,11 @@
<div
class=
"common-pop-wrapper"
*
ngIf=
"isShow"
[@
slideInOut
]
>
<div
class=
"pop_inner"
>
<div
class=
"img-wrapper"
>
<img
src=
"../assets/
model1_2
.png"
alt=
"Product"
>
<img
src=
"../assets/
basket
.png"
alt=
"Product"
>
</div>
<div
class=
"content"
>
<h1>
Order Placed Successfully
</h1>
<p
>
Order ID 123456 , Green Churidhar has been successfully order
d.
</p>
<p
*
ngIf=
"orderId"
>
Order ID {{orderId}} , New Order has been successfully Place
d.
</p>
</div>
<span
(
click
)="
istoggle
();"
><img
src=
"../assets/close.png"
alt=
"Close"
></span>
...
...
src/app/app.component.ts
View file @
f16fa4a5
...
...
@@ -54,6 +54,7 @@ export class AppComponent {
tabData
=
true
;
isShow
=
false
;
orderId
:
any
;
constructor
(
private
platform
:
Platform
,
...
...
@@ -144,7 +145,27 @@ export class AppComponent {
'review'
];
const
currentUrl
=
this
.
router
.
url
.
split
(
'/'
);
console
.
log
(
currentUrl
);
if
(
currentUrl
[
1
]
===
'home'
)
{
this
.
setActive1
();
}
if
(
currentUrl
[
1
]
===
'catagory'
)
{
this
.
setActive2
();
}
if
(
currentUrl
[
1
]
===
'searchmodal'
)
{
this
.
setActive3
();
}
if
(
currentUrl
[
1
]
===
'cart'
)
{
this
.
setActive4
();
}
if
(
currentUrl
[
1
]
===
'cart'
)
{
this
.
setActive4
();
}
if
(
currentUrl
[
1
]
===
'myorder'
)
{
this
.
setActive5
();
}
if
(
currentUrl
[
1
]
===
'profile'
)
{
this
.
setActive6
();
}
const
index
=
restrictedUrl
.
findIndex
(
x
=>
x
===
currentUrl
[
1
]);
// console.log(currentUrl[1], index, this.state);
if
(
index
>
-
1
||
this
.
tabData
===
false
)
{
...
...
@@ -223,6 +244,9 @@ export class AppComponent {
const
data
=
change
.
doc
.
data
();
if
(
data
.
orderStatus
===
7
)
{
this
.
finishpop
(
data
);
}
else
{
this
.
orderId
=
data
.
orderCode
;
this
.
isShow
=
true
;
}
}
});
...
...
src/app/productdetail/productdetail.page.ts
View file @
f16fa4a5
...
...
@@ -189,13 +189,22 @@ export class ProductdetailPage implements OnInit {
}
socialShare
(
prodName
,
category
,
subCate
,
price
,
image
)
{
const
desc
=
prodName
+
', '
+
category
+
', '
+
subCate
+
', '
+
price
;
const
desc
=
this
.
unEscape
(
prodName
)
+
', '
+
category
+
', '
+
subCate
+
', '
+
'AU$'
+
price
;
console
.
log
(
image
);
this
.
service
.
getBase64ImageFromUrl
(
image
)
.
then
((
result
:
any
)
=>
{
const
content
=
{
message
:
desc
,
// not supported on some apps (Facebook, Instagram)
subject
:
prodName
,
// fi. for email
files
:
[
image
],
subject
:
this
.
unEscape
(
prodName
)
,
// fi. for email
files
:
[
result
],
chooserTitle
:
'GetMi'
};
console
.
log
(
content
);
this
.
socialSharing
.
shareWithOptions
(
content
);
}).
catch
(
err
=>
console
.
error
(
err
));
}
}
src/config/order.service.ts
View file @
f16fa4a5
...
...
@@ -8,6 +8,7 @@ import { Router, ActivatedRoute } from '@angular/router';
import
{
Order
,
CartProd
}
from
'./services/order'
;
import
{
Products
}
from
'./services/product'
;
import
{
ServiceService
}
from
'./service.service'
;
import
{
SubjectService
}
from
'./subject.service'
;
import
*
as
firebase
from
'firebase'
;
import
{
CartItem
}
from
'./services/cart'
;
import
{
BehaviorSubject
}
from
'rxjs'
;
...
...
@@ -30,7 +31,8 @@ export class OrdersService {
constructor
(
public
afs
:
AngularFirestore
,
public
router
:
Router
,
public
service
:
ServiceService
public
service
:
ServiceService
,
public
subject
:
SubjectService
)
{
this
.
size
=
'small'
;
this
.
color
=
'Blue'
;
...
...
src/config/service.service.ts
View file @
f16fa4a5
...
...
@@ -106,4 +106,22 @@ export class ServiceService {
});
return
promise
;
}
async
getBase64ImageFromUrl
(
imageUrl
)
{
const
proxyUrl
=
'https://cors-anywhere.herokuapp.com/'
const
res
=
await
fetch
(
proxyUrl
+
imageUrl
);
const
blob
=
await
res
.
blob
();
return
new
Promise
((
resolve
,
reject
)
=>
{
const
reader
=
new
FileReader
();
reader
.
addEventListener
(
'load'
,
()
=>
{
resolve
(
reader
.
result
);
},
false
);
reader
.
onerror
=
()
=>
{
return
reject
(
this
);
};
reader
.
readAsDataURL
(
blob
);
});
}
}
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