Added authorization server and backup of JSReport config. IO-585
This commit is contained in:
12
jsreport/data/Kavia/config.json
Normal file
12
jsreport/data/Kavia/config.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"name": "Kavia",
|
||||
"creationDate": {
|
||||
"$$date": 1609970586507
|
||||
},
|
||||
"modificationDate": {
|
||||
"$$date": 1609970586507
|
||||
},
|
||||
"shortid": "DFfQj6G",
|
||||
"_id": "d1Q1GisfxvFchxnb",
|
||||
"$entitySet": "folders"
|
||||
}
|
||||
14
jsreport/data/Kavia/header.html/config.json
Normal file
14
jsreport/data/Kavia/header.html/config.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"name": "header.html",
|
||||
"creationDate": {
|
||||
"$$date": 1609975320390
|
||||
},
|
||||
"modificationDate": {
|
||||
"$$date": 1609981839653
|
||||
},
|
||||
"shortid": "pYla8mM",
|
||||
"inheritedReadPermissions": [],
|
||||
"inheritedEditPermissions": [],
|
||||
"_id": "iLQICSvbUjE2vy2Q",
|
||||
"$entitySet": "assets"
|
||||
}
|
||||
14
jsreport/data/Kavia/header.html/content.html
Normal file
14
jsreport/data/Kavia/header.html/content.html
Normal file
@@ -0,0 +1,14 @@
|
||||
<div style="display: flex; justify-content: center; align-items: center">
|
||||
<div style="display: flex; flex-direction: row; align-items: center">
|
||||
<img alt="" src="https://thinkimex.com/imexlogo.png" />
|
||||
<div>
|
||||
<div>
|
||||
<strong>Kavia Autobody</strong>
|
||||
</div>
|
||||
<div>1202 - 1001 Homer St</div>
|
||||
<div>
|
||||
Vancouver, BC V6B 1M9
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
21
jsreport/data/Starter Template/config.json
Normal file
21
jsreport/data/Starter Template/config.json
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"name": "Starter Template",
|
||||
"recipe": "html",
|
||||
"shortid": "dbHQiFF9aR",
|
||||
"engine": "handlebars",
|
||||
"chrome": {
|
||||
"printBackground": true
|
||||
},
|
||||
"creationDate": {
|
||||
"$$date": 1609983284287
|
||||
},
|
||||
"modificationDate": {
|
||||
"$$date": 1609983513111
|
||||
},
|
||||
"data": null,
|
||||
"scripts": [],
|
||||
"inheritedReadPermissions": [],
|
||||
"inheritedEditPermissions": [],
|
||||
"_id": "slk6YH0reas7fIJh",
|
||||
"$entitySet": "templates"
|
||||
}
|
||||
15
jsreport/data/Starter Template/content.handlebars
Normal file
15
jsreport/data/Starter Template/content.handlebars
Normal file
@@ -0,0 +1,15 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
|
||||
<style>
|
||||
{#asset _globals/styles.css @encoding=utf8}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container">
|
||||
<div>{#asset {{headerpath}}}</div>
|
||||
<span>This is a basic template</span>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
1
jsreport/data/Starter Template/helpers.js
Normal file
1
jsreport/data/Starter Template/helpers.js
Normal file
@@ -0,0 +1 @@
|
||||
{#asset _globals/helpers.js @encoding=utf8}
|
||||
12
jsreport/data/_Sample Data/config.json
Normal file
12
jsreport/data/_Sample Data/config.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"name": "_Sample Data",
|
||||
"creationDate": {
|
||||
"$$date": 1609960203821
|
||||
},
|
||||
"modificationDate": {
|
||||
"$$date": 1609983884494
|
||||
},
|
||||
"shortid": "NMAT8M~",
|
||||
"_id": "NzVW38TsFYuiwkE1",
|
||||
"$entitySet": "folders"
|
||||
}
|
||||
14
jsreport/data/_Sample Data/job/config.json
Normal file
14
jsreport/data/_Sample Data/job/config.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"shortid": "saoWgKHbS6",
|
||||
"name": "job",
|
||||
"creationDate": {
|
||||
"$$date": 1609960213183
|
||||
},
|
||||
"modificationDate": {
|
||||
"$$date": 1609983495622
|
||||
},
|
||||
"inheritedReadPermissions": [],
|
||||
"inheritedEditPermissions": [],
|
||||
"_id": "kB2g429hShgHLZmO",
|
||||
"$entitySet": "data"
|
||||
}
|
||||
11
jsreport/data/_Sample Data/job/dataJson.json
Normal file
11
jsreport/data/_Sample Data/job/dataJson.json
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"headerpath":"/Kavia/header.html"
|
||||
,"jobs_by_pk":{
|
||||
"start": "2020-12-02T19:45:58.454+00:00",
|
||||
"title": null,
|
||||
"job": {
|
||||
"ownr_fn": "TYLER",
|
||||
"ownr_ln": "BODNARCHUK",
|
||||
"ownr_ea": null
|
||||
}
|
||||
}}
|
||||
12
jsreport/data/_globals/config.json
Normal file
12
jsreport/data/_globals/config.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"name": "_globals",
|
||||
"creationDate": {
|
||||
"$$date": 1609959897101
|
||||
},
|
||||
"modificationDate": {
|
||||
"$$date": 1609959897101
|
||||
},
|
||||
"shortid": "Ek4vtyE",
|
||||
"_id": "LGAznUA50hrX9QC2",
|
||||
"$entitySet": "folders"
|
||||
}
|
||||
14
jsreport/data/_globals/helpers.js/config.json
Normal file
14
jsreport/data/_globals/helpers.js/config.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"name": "helpers.js",
|
||||
"creationDate": {
|
||||
"$$date": 1609960774906
|
||||
},
|
||||
"modificationDate": {
|
||||
"$$date": 1609960781053
|
||||
},
|
||||
"shortid": "a49TcoN",
|
||||
"_id": "1lAwHKwaeG3TJBTT",
|
||||
"$entitySet": "assets",
|
||||
"inheritedReadPermissions": [],
|
||||
"inheritedEditPermissions": []
|
||||
}
|
||||
25
jsreport/data/_globals/helpers.js/content.js
Normal file
25
jsreport/data/_globals/helpers.js/content.js
Normal file
@@ -0,0 +1,25 @@
|
||||
|
||||
const moment = require('moment')
|
||||
|
||||
function formatReportDate (date) {
|
||||
return moment(date).format('YYYY MMMM DD')
|
||||
}
|
||||
|
||||
function now() {
|
||||
return new Date().toLocaleDateString()
|
||||
}
|
||||
|
||||
function nowPlus20Days() {
|
||||
var date = new Date()
|
||||
date.setDate(date.getDate() + 20);
|
||||
return date.toLocaleDateString();
|
||||
}
|
||||
|
||||
function total(items) {
|
||||
var sum = 0
|
||||
items.forEach(function (i) {
|
||||
console.log('Calculating item ' + i.name + '; you should see this message in debug run')
|
||||
sum += i.price
|
||||
})
|
||||
return sum
|
||||
}
|
||||
14
jsreport/data/_globals/styles.css/config.json
Normal file
14
jsreport/data/_globals/styles.css/config.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"name": "styles.css",
|
||||
"creationDate": {
|
||||
"$$date": 1609960168894
|
||||
},
|
||||
"modificationDate": {
|
||||
"$$date": 1609982175635
|
||||
},
|
||||
"shortid": "TGu7wUV",
|
||||
"_id": "9CWHJHWV4GlWHMKC",
|
||||
"$entitySet": "assets",
|
||||
"inheritedReadPermissions": [],
|
||||
"inheritedEditPermissions": []
|
||||
}
|
||||
9
jsreport/data/_globals/styles.css/content.css
Normal file
9
jsreport/data/_globals/styles.css/content.css
Normal file
File diff suppressed because one or more lines are too long
12
jsreport/data/estimate_detail.query/config.json
Normal file
12
jsreport/data/estimate_detail.query/config.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"name": "estimate_detail.query",
|
||||
"creationDate": {
|
||||
"$$date": 1609978752854
|
||||
},
|
||||
"modificationDate": {
|
||||
"$$date": 1609981955227
|
||||
},
|
||||
"shortid": "kPkTOno",
|
||||
"_id": "YwBpKAPlgA3CWdJ4",
|
||||
"$entitySet": "assets"
|
||||
}
|
||||
32
jsreport/data/estimate_detail.query/content.query
Normal file
32
jsreport/data/estimate_detail.query/content.query
Normal file
@@ -0,0 +1,32 @@
|
||||
query TEMPLATE_ESTIMATE_DETAIL($id: uuid!) {
|
||||
jobs_by_pk(id: $id) {
|
||||
csr
|
||||
ded_amt
|
||||
ded_status
|
||||
id
|
||||
ownr_co_nm
|
||||
ownr_ln
|
||||
ownr_fn
|
||||
plate_no
|
||||
plate_st
|
||||
ro_number
|
||||
regie_number
|
||||
tlos_ind
|
||||
v_color
|
||||
v_make_desc
|
||||
v_model_desc
|
||||
v_model_yr
|
||||
v_vin
|
||||
clm_no
|
||||
joblines(order_by: { line_no: asc }) {
|
||||
id
|
||||
mod_lbr_ty
|
||||
mod_lb_hrs
|
||||
part_qty
|
||||
oem_partno
|
||||
op_code_desc
|
||||
line_desc
|
||||
line_no
|
||||
}
|
||||
}
|
||||
}
|
||||
23
jsreport/data/estimate_detail/config.json
Normal file
23
jsreport/data/estimate_detail/config.json
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"shortid": "GPfI1d0AbH",
|
||||
"name": "estimate_detail",
|
||||
"recipe": "html",
|
||||
"engine": "handlebars",
|
||||
"chrome": {
|
||||
"printBackground": true
|
||||
},
|
||||
"creationDate": {
|
||||
"$$date": 1609960117288
|
||||
},
|
||||
"modificationDate": {
|
||||
"$$date": 1609983488727
|
||||
},
|
||||
"_id": "c3ghpf4MqODO3F6r",
|
||||
"$entitySet": "templates",
|
||||
"data": {
|
||||
"shortid": "saoWgKHbS6"
|
||||
},
|
||||
"scripts": [],
|
||||
"inheritedReadPermissions": [],
|
||||
"inheritedEditPermissions": []
|
||||
}
|
||||
150
jsreport/data/estimate_detail/content.handlebars
Normal file
150
jsreport/data/estimate_detail/content.handlebars
Normal file
@@ -0,0 +1,150 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
|
||||
<style>
|
||||
{#asset _globals/styles.css @encoding=utf8}
|
||||
</style>
|
||||
<style>@import url('https://fonts.googleapis.com/css2?family=Montserrat&display=swap');
|
||||
|
||||
body {
|
||||
background-color: #ffe8d2;
|
||||
font-family: 'Montserrat', sans-serif
|
||||
}
|
||||
|
||||
.card {
|
||||
border: none
|
||||
}
|
||||
|
||||
.logo {
|
||||
background-color: #eeeeeea8
|
||||
}
|
||||
|
||||
.totals tr td {
|
||||
font-size: 13px
|
||||
}
|
||||
|
||||
.footer {
|
||||
background-color: #eeeeeea8
|
||||
}
|
||||
|
||||
.footer span {
|
||||
font-size: 12px
|
||||
}
|
||||
|
||||
.product-qty span {
|
||||
font-size: 12px;
|
||||
color: #dedbdb
|
||||
}</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container mt-5 mb-5">
|
||||
<div>{#asset {{headerpath}}}</div>
|
||||
<div class="row d-flex justify-content-center">
|
||||
<div class="col-md-8">
|
||||
<div class="card">
|
||||
<div class="text-left logo p-2 px-5"> <img src="https://i.imgur.com/2zDU056.png" width="50"> </div>
|
||||
<div class="invoice p-5">
|
||||
<h5>Your order Confirmed!</h5> <span class="font-weight-bold d-block mt-4">Hello, Chris</span> <span>You order has been confirmed and will be shipped in next two days!</span>
|
||||
<div class="payment border-top mt-3 mb-3 border-bottom table-responsive">
|
||||
<table class="table table-borderless">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="py-2"> <span class="d-block text-muted">Order Date</span> <span>12 Jan,2018</span> </div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="py-2"> <span class="d-block text-muted">Order No</span> <span>MT12332345</span> </div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="py-2"> <span class="d-block text-muted">Payment</span> <span><img src="https://img.icons8.com/color/48/000000/mastercard.png" width="20" /></span> </div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="py-2"> <span class="d-block text-muted">Shiping Address</span> <span>414 Advert Avenue, NY,USA</span> </div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="product border-bottom table-responsive">
|
||||
<table class="table table-borderless">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td width="20%"> <img src="https://i.imgur.com/u11K1qd.jpg" width="90"> </td>
|
||||
<td width="60%"> <span class="font-weight-bold">Men's Sports cap</span>
|
||||
<div class="product-qty"> <span class="d-block">Quantity:1</span> <span>Color:Dark</span> </div>
|
||||
</td>
|
||||
<td width="20%">
|
||||
<div class="text-right"> <span class="font-weight-bold">$67.50</span> </div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="20%"> <img src="https://i.imgur.com/SmBOua9.jpg" width="70"> </td>
|
||||
<td width="60%"> <span class="font-weight-bold">Men's Collar T-shirt</span>
|
||||
<div class="product-qty"> <span class="d-block">Quantity:1</span> <span>Color:Orange</span> </div>
|
||||
</td>
|
||||
<td width="20%">
|
||||
<div class="text-right"> <span class="font-weight-bold">$77.50</span> </div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="row d-flex justify-content-end">
|
||||
<div class="col-md-5">
|
||||
<table class="table table-borderless">
|
||||
<tbody class="totals">
|
||||
<tr>
|
||||
<td>
|
||||
<div class="text-left"> <span class="text-muted">Subtotal</span> </div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="text-right"> <span>$168.50</span> </div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="text-left"> <span class="text-muted">Shipping Fee</span> </div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="text-right"> <span>$22</span> </div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="text-left"> <span class="text-muted">Tax Fee</span> </div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="text-right"> <span>$7.65</span> </div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="text-left"> <span class="text-muted">Discount</span> </div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="text-right"> <span class="text-success">$168.50</span> </div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="border-top border-bottom">
|
||||
<td>
|
||||
<div class="text-left"> <span class="font-weight-bold">Subtotal</span> </div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="text-right"> <span class="font-weight-bold">$238.50</span> </div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<p>We will be sending shipping confirmation email when the item shipped successfully!</p>
|
||||
<p class="font-weight-bold mb-0">Thanks for shopping with us!</p> <span>Nike Team</span>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between footer p-3"> <span>Need Help? visit our <a href="#"> help center</a></span> <span>12 June, 2020</span> </div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
1
jsreport/data/estimate_detail/helpers.js
Normal file
1
jsreport/data/estimate_detail/helpers.js
Normal file
@@ -0,0 +1 @@
|
||||
{#asset _globals/helpers.js @encoding=utf8}
|
||||
5
jsreport/data/settings
Normal file
5
jsreport/data/settings
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user