-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prefilled, Cached Form "Templates" #221
Comments
This looks like a very useful feature - especially for journal vouchers/ simplified journal vouchers. I would guard against spending a lot of time making this 100% generic/ flexible for now as we are approaching a development deadline but this would make these two pages extremely polished. Initially I thought you were describing a generic form cache utility that recovers an object (with ng-models attached) if the page had not completed submission on a form (similar to the cache in patient invoices - and how GithHub will save your comments/ pull request text if you close the browser/refresh the page). The library/ service could be attached to a form so that each page does not have to implement this cache logic individually. I don't think this suggestion is very high priority but if anyone thinks it is interested we can create an issue tracking it. (Really slick mock ups!) |
@sfount , thanks for your feedback. Yes, the #207 issue mentions something similar to the cache utility you are describing (in the advanced features). We should definitely create an issue tracking that, though I agree it is pretty far off at this point. Once we have a few more form examples working, we'll feel a much greater use for such a cache. Just in case anyone is confused about the difference between the two methods of caching, here is a breakdown of key differences: This Proposal
@sfount's Proposal
|
This is pretty close to superseded by Voucher Tools introduced to the Simple Voucher module. Closing as it will need to be re-evaluated to implement in the current application's ecosystem. |
1888: Update gulp-rev to the latest version 🚀 r=jniles ## Version **8.0.0** of [gulp-rev](https://github.com/sindresorhus/gulp-rev) just got published. <table> <tr> <th align=left> Dependency </td> <td> gulp-rev </td> </tr> <tr> <th align=left> Current Version </td> <td> 7.1.2 </td> </tr> <tr> <th align=left> Type </td> <td> devDependency </td> </tr> </table> The version **8.0.0** is **not covered** by your **current version range**. Without accepting this pull request your project will work just like it did before. There might be a bunch of new features, fixes and perf improvements that the maintainers worked on for you though. I recommend you look into these changes and try to get onto the latest version of gulp-rev. Given that you have a decent test suite, a passing build is a strong indicator that you can take advantage of these changes by merging the proposed change into your project. Otherwise this branch is a great starting point for you to work on the update. --- <details> <summary>Commits</summary> <p>The new version differs by 13 commits.</p> <ul> <li><a href="https://urls.greenkeeper.io/sindresorhus/gulp-rev/commit/898dffcd9f9d5088895182de543b08b3e83040b3"><code>898dffc</code></a> <code>8.0.0</code></li> <li><a href="https://urls.greenkeeper.io/sindresorhus/gulp-rev/commit/d290ff82d263048416582a0b220046815d17c05e"><code>d290ff8</code></a> <code>Meta tweaks</code></li> <li><a href="https://urls.greenkeeper.io/sindresorhus/gulp-rev/commit/a89f0dff0f4ca3782640ec81ad1c1785d07b2be8"><code>a89f0df</code></a> <code>Make tests independent of platform specific path separator (#219) (#221)</code></li> <li><a href="https://urls.greenkeeper.io/sindresorhus/gulp-rev/commit/71a0377821e310b437159eb6909a93d02ddf49c6"><code>71a0377</code></a> <code>Add a note about non-deterministic streams order (#213)</code></li> <li><a href="https://urls.greenkeeper.io/sindresorhus/gulp-rev/commit/f5ee9ee2419ae3979c083ac7cadd1208a2cdddc0"><code>f5ee9ee</code></a> <code>Meta tweaks</code></li> <li><a href="https://urls.greenkeeper.io/sindresorhus/gulp-rev/commit/731be706d08ab78fa75bffdaeedcd303a6692890"><code>731be70</code></a> <code>Move list of maintainers into the readme for visibility</code></li> <li><a href="https://urls.greenkeeper.io/sindresorhus/gulp-rev/commit/192a0753ca509b7acf622165a02227889b56b714"><code>192a075</code></a> <code>Meta tweaks</code></li> <li><a href="https://urls.greenkeeper.io/sindresorhus/gulp-rev/commit/7acdb13e7f079fce816320547de11793f01ed625"><code>7acdb13</code></a> <code>Move tests from Mocha to AVA (#212)</code></li> <li><a href="https://urls.greenkeeper.io/sindresorhus/gulp-rev/commit/82c185cbe9ef6a421365bc1120a0eeefdc787d3e"><code>82c185c</code></a> <code>More realistic example (#203)</code></li> <li><a href="https://urls.greenkeeper.io/sindresorhus/gulp-rev/commit/02fbeba48364118d3886decb39359102689608ea"><code>02fbeba</code></a> <code>add XO badge</code></li> <li><a href="https://urls.greenkeeper.io/sindresorhus/gulp-rev/commit/8686e62b380a22976f314687bd3f79ca69cae24f"><code>8686e62</code></a> <code>[breaking] ES2015ify and require Node.js 4</code></li> <li><a href="https://urls.greenkeeper.io/sindresorhus/gulp-rev/commit/ed53cefc8486ce95e9a5f5d837ddaf0ce16e2ad8"><code>ed53cef</code></a> <code>meta tweaks</code></li> <li><a href="https://urls.greenkeeper.io/sindresorhus/gulp-rev/commit/17d6bb42525f46dd6ff60fa56d45be86c15152a3"><code>17d6bb4</code></a> <code>docs: change number of approaches (#196)</code></li> </ul> <p>See the <a href="https://urls.greenkeeper.io/sindresorhus/gulp-rev/compare/e895123b92f4a39fcf6a3f37dbdd78bc6f93c0c5...898dffcd9f9d5088895182de543b08b3e83040b3">full diff</a></p> </details> <details> <summary>Not sure how things should work exactly?</summary> There is a collection of [frequently asked questions](https://greenkeeper.io/faq.html) and of course you may always [ask my humans](https://github.com/greenkeeperio/greenkeeper/issues/new). </details> --- Your [Greenkeeper](https://greenkeeper.io) Bot 🌴
3196: Update snyk to the latest version 🚀 r=jniles a=greenkeeper[bot] ## The dependency [snyk](https://github.com/snyk/snyk) was updated from `1.97.1` to `1.98.0`. This version is **not covered** by your **current version range**. If you don’t accept this pull request, your project will work just like it did before. However, you might be missing out on a bunch of new features, fixes and/or performance improvements from the dependency update. --- <details> <summary>Release Notes for v1.98.0</summary> <h1><a href="https://urls.greenkeeper.io/snyk/snyk/compare/v1.97.1...v1.98.0">1.98.0</a> (2018-09-25)</h1> <h3>Bug Fixes</h3> <ul> <li>better error messaging for wizard without node_modules (<a href="https://urls.greenkeeper.io/snyk/snyk/commit/45d892e">45d892e</a>)</li> </ul> <h3>Features</h3> <ul> <li>add yarn.lock support (<a href="https://urls.greenkeeper.io/snyk/snyk/commit/08d6248">08d6248</a>)</li> </ul> </details> <details> <summary>Commits</summary> <p>The new version differs by 6 commits.</p> <ul> <li><a href="https://urls.greenkeeper.io/snyk/snyk/commit/4ba7ad459f3834526b09fe60463de9fb930c679b"><code>4ba7ad4</code></a> <code>Merge pull request #221 from snyk/feat/add-yarn-lock-support</code></li> <li><a href="https://urls.greenkeeper.io/snyk/snyk/commit/45d892e8a53603cffd419663c975b3e04af15dd2"><code>45d892e</code></a> <code>fix: better error messaging for wizard without node_modules</code></li> <li><a href="https://urls.greenkeeper.io/snyk/snyk/commit/da3d92c74db6de67670ab57268b96452755ae9fe"><code>da3d92c</code></a> <code>test: verify behaviour on node 4</code></li> <li><a href="https://urls.greenkeeper.io/snyk/snyk/commit/08d6248b872854b927f35de706fab321687d5790"><code>08d6248</code></a> <code>feat: add yarn.lock support</code></li> <li><a href="https://urls.greenkeeper.io/snyk/snyk/commit/d0a19b3c5004fcd3799154c7ea7c5d02463247b6"><code>d0a19b3</code></a> <code>test: yarn.lock coverage</code></li> <li><a href="https://urls.greenkeeper.io/snyk/snyk/commit/95144e84852deaa2fac91d045ae98b4836877a39"><code>95144e8</code></a> <code>chore: update lockfile parser version</code></li> </ul> <p>See the <a href="https://urls.greenkeeper.io/snyk/snyk/compare/142379bc77669be1387eef821f1c8779b3638b3f...4ba7ad459f3834526b09fe60463de9fb930c679b">full diff</a></p> </details> <details> <summary>FAQ and help</summary> There is a collection of [frequently asked questions](https://greenkeeper.io/faq.html). If those don’t help, you can always [ask the humans behind Greenkeeper](https://github.com/greenkeeperio/greenkeeper/issues/new). </details> --- Your [Greenkeeper](https://greenkeeper.io) bot 🌴 Co-authored-by: greenkeeper[bot] <greenkeeper[bot]@users.noreply.github.com>
This issue describes a method of manually saving the form values for almost any form in a local cache, to be loaded easily at a later time.
Motivation
There are some large forms in bhima may be used a lot. For example, the Journal Voucher form and Simple Voucher forms will take over the entire function of the outdated "Primary Cash" module in bhima. Many of these transactions will be very similar:
Since we have a robust cache system in bhima, we could allow the user to saved named "templates" of transactions that happen frequently. The user would be able to load this template up by its name, fill in a few details, and submit to the database.
Mockups (Simple Voucher Example)
Template Buttons on a Form
![form templates high-level](https://cloud.githubusercontent.com/assets/896472/14059134/98ddb200-f338-11e5-82e0-1425274611e8.png)
Loading a Previous Template
![form templates load a template](https://cloud.githubusercontent.com/assets/896472/14059135/98ea1d74-f338-11e5-96ab-b442564c4a73.png)
Saving a New Template
![form templates save a template](https://cloud.githubusercontent.com/assets/896472/14059136/98f07e62-f338-11e5-8628-66e399ef9266.png)
Previous Template Selected and Loaded
![form templates form loaded](https://cloud.githubusercontent.com/assets/896472/14059133/98d154c4-f338-11e5-80ba-b64cf58429bc.png)
Design
The mockups should do a pretty good job conveying the design. The form controller would import the
FormTemplateLocalCache
service, and assign a namespace to save the forms under locally. If there are templates available, it will display the "Load a Template" link. Otherwise, this button will be hidden.Not all information should be cached! The date, amount, user, etc... should not be saved. The design of the "Save a Template" modal will need to take this into account.
The "Load a Template" modal will likely be generic (simple a call to
FormTemplateLocalCache.loadTemplate(namespace)
), but the design of theFormTemplateLocalCache.saveTemplate(namespace, data)
will likely need to be specific to the form, in order to know what to cache and what to discard. It also needs to show a specific preview, depending on the form it is called from.Additional Thoughts
If this is a useful concept, we might think about developing a way to store the vouchers on the server-side. For now, we should limit our scope to the client until we have proven that this idea is a useful feature.
The text was updated successfully, but these errors were encountered: