json-object-editor 0.9.87 → 0.9.901
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -1
- package/css/joe-styles.css +11 -3
- package/css/joe.css +11 -3
- package/package.json +1 -1
- package/server/schemas/ledger.js +59 -19
- package/server/schemas/recipe.js +1 -1
- package/web-components/joe-card.js +5 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
## CHANGELOG
|
|
2
|
-
### 0.9.
|
|
2
|
+
### 0.9.901
|
|
3
|
+
Ledger Updates 2021 Q4
|
|
4
|
+
fixed ledger css
|
|
5
|
+
- 901 Ledger now properly handles biweekly transactions.
|
|
6
|
+
### 0.9.891
|
|
3
7
|
fixed notes bug
|
|
4
8
|
81 - fixed checkChanges bug with objectReferences and chrckbox groups
|
|
5
9
|
82 - project goals filter updated
|
|
@@ -9,6 +13,9 @@
|
|
|
9
13
|
85 - custom list items
|
|
10
14
|
86 - updated standard list report
|
|
11
15
|
87 - itemmenu css mobile fix
|
|
16
|
+
88 - 2021 in ledger (default), main added to recipe type
|
|
17
|
+
89 - bigger/smaller/margin-10 css styles.
|
|
18
|
+
891 - width50 joe-card
|
|
12
19
|
|
|
13
20
|
### 0.9.79 Autocomplete and List Updates
|
|
14
21
|
Autocomplete can now work with simple strings
|
package/css/joe-styles.css
CHANGED
|
@@ -148,8 +148,12 @@ html.no-touch .clickable:hover{
|
|
|
148
148
|
box-sizing: border-box;
|
|
149
149
|
}
|
|
150
150
|
|
|
151
|
-
joe-bigger{font-size:1.2em;}
|
|
152
|
-
joe-smaller{font-size:.8em;}
|
|
151
|
+
joe-bigger,.bigger{font-size:1.2em;}
|
|
152
|
+
joe-smaller,.smaller{font-size:.8em;}
|
|
153
|
+
|
|
154
|
+
.margin-10{
|
|
155
|
+
margin:10px;
|
|
156
|
+
}
|
|
153
157
|
|
|
154
158
|
/* ------------------------- BEGin joe-user-cube ---------------------*/
|
|
155
159
|
joe-user-cube{
|
|
@@ -3371,7 +3375,7 @@ html.touch .small-size .joe-objectlist-table input[type=number]:focus{
|
|
|
3371
3375
|
cursor:pointer;
|
|
3372
3376
|
transition:.2s background-color;
|
|
3373
3377
|
padding:10px;
|
|
3374
|
-
line-height: 1em;
|
|
3378
|
+
line-height: 1.1em;
|
|
3375
3379
|
font-size:.8em;
|
|
3376
3380
|
}
|
|
3377
3381
|
html.no-touch .joe-objectlist-row.templated .row-template:hover{
|
|
@@ -3580,6 +3584,10 @@ joe-checkbox.checked joe-checkbox-percentage{
|
|
|
3580
3584
|
line-height: 18px;
|
|
3581
3585
|
}
|
|
3582
3586
|
|
|
3587
|
+
.joe-table.fixed {
|
|
3588
|
+
table-layout: fixed;
|
|
3589
|
+
}
|
|
3590
|
+
|
|
3583
3591
|
table.joe-table td,
|
|
3584
3592
|
table.joe-table th
|
|
3585
3593
|
{
|
package/css/joe.css
CHANGED
|
@@ -634,8 +634,12 @@ html.no-touch .clickable:hover{
|
|
|
634
634
|
box-sizing: border-box;
|
|
635
635
|
}
|
|
636
636
|
|
|
637
|
-
joe-bigger{font-size:1.2em;}
|
|
638
|
-
joe-smaller{font-size:.8em;}
|
|
637
|
+
joe-bigger,.bigger{font-size:1.2em;}
|
|
638
|
+
joe-smaller,.smaller{font-size:.8em;}
|
|
639
|
+
|
|
640
|
+
.margin-10{
|
|
641
|
+
margin:10px;
|
|
642
|
+
}
|
|
639
643
|
|
|
640
644
|
/* ------------------------- BEGin joe-user-cube ---------------------*/
|
|
641
645
|
joe-user-cube{
|
|
@@ -3857,7 +3861,7 @@ html.touch .small-size .joe-objectlist-table input[type=number]:focus{
|
|
|
3857
3861
|
cursor:pointer;
|
|
3858
3862
|
transition:.2s background-color;
|
|
3859
3863
|
padding:10px;
|
|
3860
|
-
line-height: 1em;
|
|
3864
|
+
line-height: 1.1em;
|
|
3861
3865
|
font-size:.8em;
|
|
3862
3866
|
}
|
|
3863
3867
|
html.no-touch .joe-objectlist-row.templated .row-template:hover{
|
|
@@ -4066,6 +4070,10 @@ joe-checkbox.checked joe-checkbox-percentage{
|
|
|
4066
4070
|
line-height: 18px;
|
|
4067
4071
|
}
|
|
4068
4072
|
|
|
4073
|
+
.joe-table.fixed {
|
|
4074
|
+
table-layout: fixed;
|
|
4075
|
+
}
|
|
4076
|
+
|
|
4069
4077
|
table.joe-table td,
|
|
4070
4078
|
table.joe-table th
|
|
4071
4079
|
{
|
package/package.json
CHANGED
package/server/schemas/ledger.js
CHANGED
|
@@ -88,8 +88,8 @@ var schema = {
|
|
|
88
88
|
// }
|
|
89
89
|
// return '';
|
|
90
90
|
// }
|
|
91
|
-
var years = ['2020','2019','2018','2017','2016'];
|
|
92
|
-
var sets = [{name:'current',bgcolor:'yellow',
|
|
91
|
+
var years = ['2021','2020','2019','2018','2017','2016'];
|
|
92
|
+
var sets = [{name:'current',bgcolor:'yellow',filter:function(){
|
|
93
93
|
if((new Date(this.start_date).toISOString() <= _joe.nowISO)
|
|
94
94
|
&& (new Date(this.end_date).toISOString() >= _joe.times.SOD)){
|
|
95
95
|
return true;
|
|
@@ -97,7 +97,11 @@ var schema = {
|
|
|
97
97
|
return false;
|
|
98
98
|
}}];
|
|
99
99
|
years.map(function(year){
|
|
100
|
-
|
|
100
|
+
var d=false;
|
|
101
|
+
if(new Date().getFullYear() == year){
|
|
102
|
+
d=true;
|
|
103
|
+
}
|
|
104
|
+
sets.push({name:year,default:d,filter:function(){
|
|
101
105
|
return thisyear(this,year);
|
|
102
106
|
}})
|
|
103
107
|
});
|
|
@@ -177,15 +181,18 @@ var schema = {
|
|
|
177
181
|
var height = 32;
|
|
178
182
|
var balance = parseFloat(item.starting_balance);
|
|
179
183
|
var amount;
|
|
180
|
-
var html ='<table class="joe-table">'+
|
|
181
|
-
'<colgroup>'+
|
|
182
|
-
|
|
184
|
+
var html ='<table class="joe-table ledger-table fixed">'+
|
|
185
|
+
//'<colgroup>'+
|
|
186
|
+
//00ffbf
|
|
187
|
+
'<col span="1" style="width: 4px;">'+
|
|
188
|
+
'<col span="1" style="width: 50px;">'+
|
|
189
|
+
'<col span="1" >'+
|
|
183
190
|
//'<col span="1" style="width: 40px;">'+
|
|
184
|
-
'<col span="1" >\
|
|
185
|
-
<col span="1" >\
|
|
186
|
-
<col span="1" style="width:
|
|
187
|
-
|
|
188
|
-
</colgroup>'
|
|
191
|
+
'<col span="1" style="width:calc(100%-250px);">\
|
|
192
|
+
<col span="1" style="width:100px;">\
|
|
193
|
+
<col span="1" style="width:100px;">'
|
|
194
|
+
|
|
195
|
+
// +'</colgroup>'
|
|
189
196
|
+'<tr>'
|
|
190
197
|
//+'<th width=40></th><th width=40></th>'
|
|
191
198
|
+'<th colspan="4" align="left">Starting Balance</th><td style="width:75px;">'
|
|
@@ -271,6 +278,22 @@ var schema = {
|
|
|
271
278
|
transaction.tdate = tdate;
|
|
272
279
|
transactions.push($.extend({str_tdate:$c.format(new Date(tdate),'Y/m/d')},trans,pretrans,transaction));
|
|
273
280
|
|
|
281
|
+
}else if(tdate.isArray()){
|
|
282
|
+
tdate.map((ctd,i)=>{
|
|
283
|
+
let transaction = {};
|
|
284
|
+
//fix transations missing leading 0
|
|
285
|
+
if(ctd.indexOf('/') == 1){
|
|
286
|
+
ctd = '0'+ctd;
|
|
287
|
+
}
|
|
288
|
+
var pretrans = transactionPassthrough(trans,ctd);
|
|
289
|
+
transaction.amount = (trans.transaction_type == 'credit') ? pretrans.amount : -pretrans.amount;
|
|
290
|
+
// if(pretrans.status == 'paid' || pretrans.status == "autopay"){
|
|
291
|
+
// pending += transaction.amount;
|
|
292
|
+
// }
|
|
293
|
+
transaction.tdate = ctd;
|
|
294
|
+
transactions.push($.extend({str_tdate:$c.format(new Date(ctd),'Y/m/d')},trans,pretrans,transaction));
|
|
295
|
+
})
|
|
296
|
+
|
|
274
297
|
}
|
|
275
298
|
}
|
|
276
299
|
|
|
@@ -371,7 +394,7 @@ var schema = {
|
|
|
371
394
|
|
|
372
395
|
|
|
373
396
|
budget_html += '<tr data-budgetid="'+bud._id+'" class="row-divider">'
|
|
374
|
-
+ '<td colspan="
|
|
397
|
+
+ '<td colspan="5">'+bud.name+remaining_str+'</td>'
|
|
375
398
|
//+ '<td>$' + budget_amount + '</td>'
|
|
376
399
|
+'<td>' + budget_amount + '</td>'
|
|
377
400
|
+'<td align="right" class="left-border" style="font-weight:500;">' +('$'+balance).replace('$-','-$') + '</td>'
|
|
@@ -379,20 +402,23 @@ var schema = {
|
|
|
379
402
|
budget_html+= subhtml;
|
|
380
403
|
});
|
|
381
404
|
//_bmResponse(bm,'budget loop')
|
|
382
|
-
budget_html = '<tr><th colspan="
|
|
383
|
-
+'<th colspan="2" align="right">'+('$'+bst).replace('$-','-$')
|
|
405
|
+
budget_html = '<tr class="budget-header"><th colspan="4" align="left">Budgeted Spending <br/><small>total</small></th>'
|
|
406
|
+
+'<th colspan="2" align="right">'+('$'+bst).replace('$-','-$')
|
|
407
|
+
+'</th>'
|
|
408
|
+
//+'<td></td>'
|
|
409
|
+
+'</tr>'+budget_html;
|
|
384
410
|
|
|
385
411
|
//var ending = _joe.getField('transactions').getEndingTotals();
|
|
386
412
|
var ending = _joe.schemas.ledger.methods.getEndingTotals(ledger);
|
|
387
413
|
ledger.ending_balance = balance;
|
|
388
414
|
var remaining_withdrawals = _joe.Utils.toDollars(ending.pending+ending.unspent);
|
|
389
415
|
html+=budget_html+
|
|
390
|
-
'<tr><th colspan="
|
|
391
|
-
+'<tr><td colspan="
|
|
416
|
+
'<tr class="end-bal-header"><th colspan="6" align="left">Ending Balance</th><td align="right"><b>$'+balance+'</b></td></tr>'
|
|
417
|
+
+'<tr><td colspan="4"></td><th colspan="2" align="left">Unspent</th><td id="unspent">$'
|
|
392
418
|
+_joe.Utils.toDollars(ending.unspent)+'</td></tr>'
|
|
393
|
-
+'<tr><td colspan="
|
|
419
|
+
+'<tr><td colspan="4"></td><th colspan="2" align="left">Pending</th><td id="pending">$'
|
|
394
420
|
+_joe.Utils.toDollars(ending.pending)+'</td></tr>'
|
|
395
|
-
+'<tr><td colspan="
|
|
421
|
+
+'<tr><td colspan="4"></td><th colspan="2" align="left">Remaining Withdrawals</th><td id="total_spending">$'+remaining_withdrawals+'</td></tr>'
|
|
396
422
|
|
|
397
423
|
// +'<tr><td colspan="3"></td><th colspan="2" align="left">Total</th><td id="total_spending">$'+ending.total+'</td></tr>'
|
|
398
424
|
+'</tbody></table>';
|
|
@@ -573,6 +599,7 @@ var schema = {
|
|
|
573
599
|
}
|
|
574
600
|
case 'biweekly':
|
|
575
601
|
var next ='';
|
|
602
|
+
var timesInRange = [];
|
|
576
603
|
var tdate = new Date(t.transaction_date);
|
|
577
604
|
if(tdate >= startDate && tdate <= endDate){
|
|
578
605
|
return (tdate.getMonth()+1)+'/'+("0" + tdate.getDate()).slice(-2)+'/'+tdate.getFullYear();
|
|
@@ -581,10 +608,16 @@ var schema = {
|
|
|
581
608
|
|
|
582
609
|
while(tdate <= endDate) {
|
|
583
610
|
tdate.setHours(24 * 14);
|
|
611
|
+
// if(tdate >= startDate && tdate <= endDate){
|
|
612
|
+
// return (tdate.getMonth()+1)+'/'+("0" + tdate.getDate()).slice(-2)+'/'+tdate.getFullYear();
|
|
613
|
+
// }
|
|
584
614
|
if(tdate >= startDate && tdate <= endDate){
|
|
585
|
-
|
|
615
|
+
timesInRange.push( (tdate.getMonth()+1)+'/'+("0" + tdate.getDate()).slice(-2)+'/'+tdate.getFullYear());
|
|
586
616
|
}
|
|
587
617
|
}
|
|
618
|
+
if(timesInRange.length > 0){
|
|
619
|
+
return timesInRange;
|
|
620
|
+
}
|
|
588
621
|
return true;
|
|
589
622
|
}
|
|
590
623
|
case 'monthly':
|
|
@@ -642,6 +675,12 @@ var schema = {
|
|
|
642
675
|
var id = (t._id.contains('_'))?(t._id).substr(0,t._id.indexOf('_')):t._id;
|
|
643
676
|
var specs = specs || {};
|
|
644
677
|
var bgcolor = (index%2==0)?'#f4f4f4':'transparent';
|
|
678
|
+
var stripeColor = 'transparent';
|
|
679
|
+
if(t.paycheck){
|
|
680
|
+
stripeColor = "#00ffbf";
|
|
681
|
+
}else{
|
|
682
|
+
stripeColor = (t.transaction_type =="credit")?'#00cc0044':'#cc000044';
|
|
683
|
+
}
|
|
645
684
|
var action = '_joe.getField(\'transactions\').setStatus(\''+t._id+'\')';
|
|
646
685
|
var trans_action = 'goJoe(_joe.search(\''+id+'\')[0],{schema:\'transaction\'})';
|
|
647
686
|
var input_action='_joe.getField(\'transactions\').updateAmount(this.value,\''+t._id+'\')';
|
|
@@ -663,6 +702,7 @@ var schema = {
|
|
|
663
702
|
|
|
664
703
|
var html =
|
|
665
704
|
'<tr data-transid="'+t._id+'" class="'+(specs.trcss||'')+'" style="background-color:'+(t.color||'')+';">'
|
|
705
|
+
+`<td class="trans-stripe" style="background-color:${stripeColor};"></td>`
|
|
666
706
|
+'<td onclick="'+trans_action+'" class="joe-table-button joe-view-button" title="view"> </td>'
|
|
667
707
|
//+((t.paycheck)?'': '<td onclick="'+action+'" class="joe-table-button joe-submit-button" title="status"> </td>')
|
|
668
708
|
+tname
|
package/server/schemas/recipe.js
CHANGED