Bugzilla – Attachment 147940 Details for
Bug 32991
Improve our Dialog component and remove routes for deletion
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32991: accept is a callback, rename accept to accept_callback
Bug-32991-accept-is-a-callback-rename-accept-to-ac.patch (text/plain), 4.13 KB, created by
Agustín Moyano
on 2023-03-08 14:39:44 UTC
(
hide
)
Description:
Bug 32991: accept is a callback, rename accept to accept_callback
Filename:
MIME Type:
Creator:
Agustín Moyano
Created:
2023-03-08 14:39:44 UTC
Size:
4.13 KB
patch
obsolete
>From ae3764e5fee4bd83b76d26a1637533897bc665f2 Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Date: Fri, 24 Feb 2023 17:10:03 +0000 >Subject: [PATCH] Bug 32991: accept is a callback, rename accept to > accept_callback >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> > >Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Signed-off-by: AgustÃn Moyano <agustinmoyano@theke.io> >--- > .../prog/js/vue/components/Dialog.vue | 8 ++++---- > .../intranet-tmpl/prog/js/vue/stores/main.js | 18 +++++++++--------- > 2 files changed, 13 insertions(+), 13 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Dialog.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Dialog.vue >index 85ce4bd2e7..45aa8f4661 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Dialog.vue >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Dialog.vue >@@ -12,10 +12,10 @@ > <div class="dialog alert confirmation"> > <h1 v-html="confirmation"></h1> > <button >- v-if="accept" >+ v-if="accept_callback" > id="accept_modal" > class="approve" >- @click="accept" >+ @click="accept_callback" > > > <i class="fa fa-fw fa-check"></i> > {{ $__("Accept") }} >@@ -47,7 +47,7 @@ export default { > error, > warning, > confirmation, >- accept, >+ accept_callback, > is_submitting, > is_loading, > } = storeToRefs(mainStore) >@@ -57,7 +57,7 @@ export default { > error, > warning, > confirmation, >- accept, >+ accept_callback, > is_submitting, > is_loading, > removeMessages, >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/stores/main.js b/koha-tmpl/intranet-tmpl/prog/js/vue/stores/main.js >index 8938caf88d..838ac6c9c9 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/stores/main.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/stores/main.js >@@ -6,7 +6,7 @@ export const useMainStore = defineStore("main", { > _error: null, > _warning: null, > _confirmation: null, >- _accept: null, >+ _accept_callback: null, > previousMessage: null, > previousError: null, > displayed_already: false, >@@ -28,17 +28,17 @@ export const useMainStore = defineStore("main", { > this._confirmation = null; > this.displayed_already = displayed; /* Is displayed on the current view */ > }, >- setWarning(warning, accept, displayed = true) { >+ setWarning(warning, displayed = true) { > this._error = null; > this._warning = warning; > this._message = null; > this._confirmation = null; > this.displayed_already = displayed; /* Is displayed on the current view */ > }, >- setConfirmation(confirmation, accept, displayed = true){ >- if(accept) { >- this._accept = async () => { >- await accept() >+ setConfirmation(confirmation, accept_callback, displayed = true){ >+ if(accept_callback) { >+ this._accept_callback = async () => { >+ await accept_callback() > this.removeMessages() > } > } >@@ -54,7 +54,7 @@ export const useMainStore = defineStore("main", { > this._warning = null; > this._message = null; > this._confirmation = null; >- this._accept = null; >+ this._accept_callback = null; > } > this.displayed_already = true; > }, >@@ -84,8 +84,8 @@ export const useMainStore = defineStore("main", { > confirmation() { > return this._confirmation > }, >- accept() { >- return this._accept >+ accept_callback() { >+ return this._accept_callback > }, > is_submitting(){ > return this._is_submitting >-- >2.25.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 32991
:
146828
|
146829
|
147051
|
147052
|
147053
|
147054
|
147082
|
147083
|
147281
|
147282
|
147291
|
147305
|
147350
|
147383
|
147384
|
147385
|
147387
|
147388
|
147389
|
147390
|
147391
|
147392
|
147393
|
147394
|
147429
|
147439
|
147445
|
147447
|
147448
|
147449
|
147450
|
147451
|
147452
|
147453
|
147454
|
147455
|
147456
|
147461
|
147483
|
147485
|
147486
|
147487
|
147542
|
147543
|
147544
|
147545
|
147546
|
147547
|
147548
|
147549
|
147550
|
147551
|
147552
|
147553
|
147554
|
147569
|
147573
|
147584
|
147588
|
147589
|
147590
|
147591
|
147592
|
147593
|
147594
|
147595
|
147596
|
147597
|
147598
|
147599
|
147600
|
147601
|
147602
|
147603
|
147604
|
147937
|
147938
|
147939
| 147940 |
147941
|
147942
|
147943
|
147944
|
147945
|
147946
|
147947
|
147948
|
147949
|
147950
|
147951