fix: refs #7322 handle null responses in client, agency and address fetching #1313
|
@ -377,7 +377,7 @@ login:
|
||||||
loginError: Invalid username or password
|
loginError: Invalid username or password
|
||||||
fieldRequired: This field is required
|
fieldRequired: This field is required
|
||||||
twoFactorRequired: Two-factor verification required
|
twoFactorRequired: Two-factor verification required
|
||||||
twoFactorRequired:
|
twoFactor:
|
||||||
validate: Validate
|
validate: Validate
|
||||||
insert: Enter the verification code
|
insert: Enter the verification code
|
||||||
explanation: >-
|
explanation: >-
|
||||||
|
@ -456,48 +456,6 @@ ticket:
|
||||||
consigneeStreet: Street
|
consigneeStreet: Street
|
||||||
create:
|
create:
|
||||||
address: Address
|
address: Address
|
||||||
invoiceOut:
|
|
||||||
card:
|
|
||||||
issued: Issued
|
|
||||||
customerCard: Customer card
|
|
||||||
ticketList: Ticket List
|
|
||||||
summary:
|
|
||||||
issued: Issued
|
|
||||||
dued: Due
|
|
||||||
booked: Booked
|
|
||||||
taxBreakdown: Tax breakdown
|
|
||||||
taxableBase: Taxable base
|
|
||||||
rate: Rate
|
|
||||||
fee: Fee
|
|
||||||
tickets: Tickets
|
|
||||||
totalWithVat: Amount
|
|
||||||
globalInvoices:
|
|
||||||
errors:
|
|
||||||
chooseValidClient: Choose a valid client
|
|
||||||
chooseValidCompany: Choose a valid company
|
|
||||||
chooseValidPrinter: Choose a valid printer
|
|
||||||
chooseValidSerialType: Choose a serial type
|
|
||||||
fillDates: Invoice date and the max date should be filled
|
|
||||||
invoiceDateLessThanMaxDate: Invoice date can not be less than max date
|
|
||||||
invoiceWithFutureDate: Exists an invoice with a future date
|
|
||||||
noTicketsToInvoice: There are not tickets to invoice
|
|
||||||
criticalInvoiceError: 'Critical invoicing error, process stopped'
|
|
||||||
invalidSerialTypeForAll: The serial type must be global when invoicing all clients
|
|
||||||
table:
|
|
||||||
addressId: Address id
|
|
||||||
streetAddress: Street
|
|
||||||
statusCard:
|
|
||||||
percentageText: '{getPercentage}% {getAddressNumber} of {getNAddresses}'
|
|
||||||
pdfsNumberText: '{nPdfs} of {totalPdfs} PDFs'
|
|
||||||
negativeBases:
|
|
||||||
clientId: Client Id
|
|
||||||
base: Base
|
|
||||||
active: Active
|
|
||||||
hasToInvoice: Has to Invoice
|
|
||||||
verifiedData: Verified Data
|
|
||||||
comercial: Comercial
|
|
||||||
errors:
|
|
||||||
downloadCsvFailed: CSV download failed
|
|
||||||
department:
|
department:
|
||||||
chat: Chat
|
chat: Chat
|
||||||
bossDepartment: Boss Department
|
bossDepartment: Boss Department
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
|
|
||||||
export async function getAddresses(clientId) {
|
export async function getAddresses(clientId, _filter = {}) {
|
||||||
if (!clientId) return;
|
if (!clientId) return;
|
||||||
const filter = {
|
const filter = {
|
||||||
|
..._filter,
|
||||||
fields: ['nickname', 'street', 'city', 'id'],
|
fields: ['nickname', 'street', 'city', 'id'],
|
||||||
where: { isActive: true },
|
where: { isActive: true },
|
||||||
order: 'nickname ASC',
|
order: 'nickname ASC',
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
|
|
||||||
export async function getClient(clientId) {
|
export async function getClient(clientId, _filter = {}) {
|
||||||
const filter = {
|
const filter = {
|
||||||
|
..._filter,
|
||||||
include: {
|
include: {
|
||||||
relation: 'defaultAddress',
|
relation: 'defaultAddress',
|
||||||
scope: {
|
scope: {
|
||||||
|
|
|
@ -1,11 +1,16 @@
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import agency from 'src/router/modules/agency';
|
import agency from 'src/router/modules/agency';
|
||||||
|
|
||||||
export async function getAgencies(formData, client) {
|
export async function getAgencies(formData, client, _filter = {}) {
|
||||||
if (!formData.warehouseId || !formData.addressId || !formData.landed) return;
|
if (!formData.warehouseId || !formData.addressId || !formData.landed) return;
|
||||||
|
|
||||||
|
const filter = {
|
||||||
|
..._filter
|
||||||
|
};
|
||||||
|
|
||||||
let defaultAgency = null;
|
let defaultAgency = null;
|
||||||
let params = {
|
let params = {
|
||||||
|
filter: JSON.stringify(filter),
|
||||||
warehouseFk: formData.warehouseId,
|
warehouseFk: formData.warehouseId,
|
||||||
addressFk: formData.addressId,
|
addressFk: formData.addressId,
|
||||||
landed: formData.landed,
|
landed: formData.landed,
|
||||||
|
|
Loading…
Reference in New Issue