Skip to content

Commit

Permalink
Merge pull request #4 from antistatique/support-new-harvest-design
Browse files Browse the repository at this point in the history
Support new harvest design
  • Loading branch information
gido authored Mar 17, 2019
2 parents f40ef36 + abd88bf commit 004e842
Show file tree
Hide file tree
Showing 6 changed files with 880 additions and 7 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
*NEXT RELEASE*
*1.3.0* (2019-03-17)
- Display the summary table on the estimate view page.
- Support the new Harvest Estimate Design Form.

*1.2.1* (2018-08-28)
- Remove any minified files to facilite Firefox reviews.
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifest_version": 2,
"name": "Esti'mate",
"author": "Antistatique",
"version": "1.2.1",
"version": "1.3.0",
"description": "Your Harvest estimate's best friend",
"homepage_url": "https://github.com/antistatique/esti-mate/",
"permissions": [
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "esti-mate",
"version": "1.2.1",
"version": "1.3.0",
"description": "Your estimate best friend",
"main": "src/index.js",
"repository": "git@github.com:antistatique/esti-mate.git",
Expand Down
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ ready(() => {
if (d.querySelector('.client-doc-notes')) {
targetQueryElement = '.client-doc-notes';
appView = 'view';
} else if (d.querySelector('#invoice_notes_area')) {
targetQueryElement = '#invoice_notes_area';
} else if (d.querySelector('#edit_estimate')) {
targetQueryElement = '#edit_estimate > .mt-20';
appView = 'edit';
} else {
// page not compatible with this plugin
Expand Down
3 changes: 1 addition & 2 deletions src/lib/summary.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,9 @@ const generateSummaryView = () => {
let totalQty = 0;
let totalAmount = 0;

if (!d.querySelector('.client-doc-rows')) {
if (!d.querySelector('.client-doc-rows') || d.querySelector('.edit_estimate')) {
return ;
}
console.log('generateSummaryView');

// Loop over each rows and update Quantity and Amount
d.querySelector('.client-doc-rows')
Expand Down
Loading

0 comments on commit 004e842

Please sign in to comment.