2
0
mirror of https://github.com/frappe/books.git synced 2024-11-08 23:00:56 +00:00

fix(ux): allow print when saved

This commit is contained in:
18alantom 2022-07-30 12:23:56 +05:30
parent 492aa53b68
commit f3ca36cdd3
2 changed files with 4 additions and 4 deletions

View File

@ -34,21 +34,21 @@ export class ForbiddenError extends BaseError {
} }
export class DuplicateEntryError extends ValidationError { export class DuplicateEntryError extends ValidationError {
constructor(message: string, shouldStore: boolean = true) { constructor(message: string, shouldStore: boolean = false) {
super(message, shouldStore); super(message, shouldStore);
this.name = 'DuplicateEntryError'; this.name = 'DuplicateEntryError';
} }
} }
export class LinkValidationError extends ValidationError { export class LinkValidationError extends ValidationError {
constructor(message: string, shouldStore: boolean = true) { constructor(message: string, shouldStore: boolean = false) {
super(message, shouldStore); super(message, shouldStore);
this.name = 'LinkValidationError'; this.name = 'LinkValidationError';
} }
} }
export class MandatoryError extends ValidationError { export class MandatoryError extends ValidationError {
constructor(message: string, shouldStore: boolean = true) { constructor(message: string, shouldStore: boolean = false) {
super(message, shouldStore); super(message, shouldStore);
this.name = 'MandatoryError'; this.name = 'MandatoryError';
} }

View File

@ -4,7 +4,7 @@
<template #header v-if="doc"> <template #header v-if="doc">
<StatusBadge :status="status" /> <StatusBadge :status="status" />
<Button <Button
v-if="doc?.submitted" v-if="!doc.isCancelled && !doc.dirty"
:icon="true" :icon="true"
@click="routeTo(`/print/${doc.schemaName}/${doc.name}`)" @click="routeTo(`/print/${doc.schemaName}/${doc.name}`)"
> >