worker module refactors

This commit is contained in:
Carlos Jimenez Ruiz 2020-12-16 10:32:32 +01:00
parent 2e9267a25e
commit e9f73c3299
3 changed files with 24 additions and 6 deletions

View File

@ -33,7 +33,15 @@
</vn-vertical> </vn-vertical>
</vn-card> </vn-card>
<vn-button-bar> <vn-button-bar>
<vn-submit label="Save"></vn-submit> <vn-submit
<vn-button label="Undo changes" ng-if="watcher.dataChanged()" ng-click="watcher.loadOriginalData()"></vn-button> disabled="!watcher.dataChanged()"
label="Save">
</vn-submit>
<vn-button
class="cancel"
label="Undo changes"
disabled="!watcher.dataChanged()"
ng-click="watcher.loadOriginalData()">
</vn-button>
</vn-button-bar> </vn-button-bar>
</form> </form>

View File

@ -76,8 +76,14 @@
</vn-vertical> </vn-vertical>
</vn-card> </vn-card>
<vn-button-bar> <vn-button-bar>
<vn-submit label="Upload"></vn-submit> <vn-submit
<vn-button ui-sref="worker.card.dms.index" label="Cancel"></vn-button> label="Upload">
</vn-submit>
<vn-button
class="cancel"
label="Cancel"
ui-sref="worker.card.dms.index"></vn-button>
</vn-button>
</vn-button-bar> </vn-button-bar>
</div> </div>
</form> </form>

View File

@ -14,10 +14,14 @@
</vn-vertical> </vn-vertical>
</vn-card> </vn-card>
<vn-button-bar> <vn-button-bar>
<vn-submit label="Save"></vn-submit> <vn-submit
disabled="!watcher.dataChanged()"
label="Save">
</vn-submit>
<vn-button <vn-button
class="cancel"
label="Undo changes" label="Undo changes"
ng-if="form.$dirty" disabled="!watcher.dataChanged()"
ng-click="watcher.loadOriginalData()"> ng-click="watcher.loadOriginalData()">
</vn-button> </vn-button>
</vn-button-bar> </vn-button-bar>