@@ -263,20 +263,28 @@ export default {
263263 },
264264 canRequestSignature () {
265265 return (signer ) => {
266- return this .filesStore .canRequestSign
267- && ! signer .signed
268- && signer .signRequestId
269- && ! signer .me
270- && signer .status === 0
266+ if (! this .filesStore .canRequestSign
267+ || signer .signed
268+ || ! signer .signRequestId
269+ || signer .me
270+ || signer .status !== 0 ) {
271+ return false
272+ }
273+
274+ return this .canSignerActInOrder (signer)
271275 }
272276 },
273277 canSendReminder () {
274278 return (signer ) => {
275- return this .filesStore .canRequestSign
276- && ! signer .signed
277- && signer .signRequestId
278- && ! signer .me
279- && signer .status === 1
279+ if (! this .filesStore .canRequestSign
280+ || signer .signed
281+ || ! signer .signRequestId
282+ || signer .me
283+ || signer .status !== 1 ) {
284+ return false
285+ }
286+
287+ return this .canSignerActInOrder (signer)
280288 }
281289 },
282290 showSaveButton () {
@@ -353,6 +361,21 @@ export default {
353361 getSvgIcon (name ) {
354362 return iconMap[` svg${ name .charAt (0 ).toUpperCase () + name .slice (1 )} ` ] || iconMap .svgAccount
355363 },
364+ canSignerActInOrder (signer ) {
365+ if (! this .isOrderedNumeric ) {
366+ return true
367+ }
368+
369+ const file = this .filesStore .getFile ()
370+ const signerOrder = signer .signingOrder || 1
371+
372+ const hasPendingLowerOrder = file .signers .some (s => {
373+ const otherOrder = s .signingOrder || 1
374+ return otherOrder < signerOrder && ! s .signed
375+ })
376+
377+ return ! hasPendingLowerOrder
378+ },
356379 enabledMethods () {
357380 return this .methods .filter (method => method .enabled )
358381 },
@@ -473,7 +496,6 @@ export default {
473496 await this .filesStore .updateSignatureRequest ({
474497 visibleElements: [],
475498 signers,
476- status: 1 ,
477499 })
478500 showSuccess (t (' libresign' , ' Signature requested' ))
479501 } catch (error) {
0 commit comments