Jelajahi Sumber

Adds a helpful comment to the workorder edit modal

Christopher Leggett 5 tahun lalu
induk
melakukan
591c7904e6
2 mengubah file dengan 16 tambahan dan 0 penghapusan
  1. 8 0
      public/js/app.js
  2. 8 0
      resources/js/components/WoInfoEditModal.vue

+ 8 - 0
public/js/app.js

@@ -2112,6 +2112,14 @@ __webpack_require__.r(__webpack_exports__);
       });
     }
   },
+  // The props are obtained in parent components via axios,
+  // so the values may change after the initial render, these
+  // Watchers fill in our initial values when the values of the
+  // props change. As a side effect if they are updated while we
+  // are editing they will change right underneath us, not sure
+  // probably will implement a notice when they change during edit
+  // with the option to view changes or override them or something
+  // that.
   watch: {
     populateWith: function populateWith(value) {
       this.data = JSON.parse(JSON.stringify(this.populateWith));

+ 8 - 0
resources/js/components/WoInfoEditModal.vue

@@ -59,6 +59,14 @@ export default {
                 .catch((error) => { this.errors = JSON.parse(error.response.request.response).errors; });
         }
     },
+    // The props are obtained in parent components via axios,
+    // so the values may change after the initial render, these
+    // Watchers fill in our initial values when the values of the
+    // props change. As a side effect if they are updated while we
+    // are editing they will change right underneath us, not sure
+    // probably will implement a notice when they change during edit
+    // with the option to view changes or override them or something
+    // that.
     watch: {
         populateWith: function (value) {
             this.data = JSON.parse(JSON.stringify(this.populateWith))