/
start-countdown-support.jigx
53 lines (49 loc) · 1.59 KB
/
start-countdown-support.jigx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
title: Island Holiday Packages
type: jig.list
header:
type: component.jig-header
options:
height: medium
children:
type: component.image
options:
source:
uri: https://images.unsplash.com/photo-1440778303588-435521a205bc?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxzZWFyY2h8M3x8aG9saWRheXxlbnwwfHwwfHx8MA%3D%3D&auto=format&fit=crop&w=500&q=60
datasources:
packages:
type: datasource.static
options:
data:
- name: Thailand
days: 30
description: "10 days in luxury accomodation"
Price: "$ 1500"
- name: Phuket
days: 60
description: "7 days experience cultural activities"
Price: "$ 1000"
- name: Mauritius
days: 120
description: "8 days includes watersports"
Price: "$ 2350"
- name: Bali
days: 95
description: "15 days all inclusive experience"
Price: "$ 3760"
data: =@ctx.datasources.packages
item:
type: component.list-item
options:
title: =@ctx.current.item.name
subtitle: =@ctx.current.item.description
rightElement:
element: button
title: =$fromMillis($toMillis($now()) + (@ctx.current.item.days * 24 * 60 * 60 * 1000), '[Y0001]-[M01]-[D01]')
onPress:
type: action.go-to
options:
linkTo: countdown-jig-input
parameters:
packageDate: =$fromMillis($toMillis($now()) + (@ctx.current.item.days * 24 * 60 * 60 * 1000))
packagePrice: =@ctx.current.item.Price
packageName: =@ctx.current.item.name