feat: refs #7039 country #2361

Merged
robert merged 18 commits from 7039-country-country into dev 2024-05-14 08:12:14 +00:00
31 changed files with 57 additions and 57 deletions
Showing only changes of commit 8153a526ce - Show all commits

View File

@ -45,7 +45,7 @@ module.exports = Self => {
{'pc.code': {like: `%${value}%`}},
{'t.name': {like: `%${value}%`}},
{'p.name': {like: `%${value}%`}},
{'c.country': {like: `%${value}%`}}
{'c.name': {like: `%${value}%`}}
]
};
}
@ -62,7 +62,7 @@ module.exports = Self => {
pc.code,
t.name as town,
p.name as province,
c.country
c.name as country
FROM
postCode pc
JOIN town t on t.id = pc.townFk

View File

@ -13,7 +13,7 @@
"id": true,
"description": "Identifier"
},
"country": {
"name": {
"type": "string",
"required": true
},

View File

@ -23,8 +23,8 @@ async function test() {
const opts = getopts(process.argv.slice(2), {
boolean: ['show']
});
if (opts.show)
robert marked this conversation as resolved Outdated

???

???
process.env.E2E_SHOW = true;
// if (opts.show)
process.env.E2E_SHOW = true;
console.log('Building and running DB container.');
const myt = new Myt();

View File

@ -28,7 +28,7 @@
ng-model="$ctrl.data.countryFk"
url="Countries"
fields="['id', 'country', 'code']"
show-field="country"
show-field="name"
value-field="id"
label="Country">
</vn-autocomplete>

View File

@ -123,7 +123,7 @@ module.exports = Self => {
c.hasLcr,
c.hasCoreVnl,
ct.id AS countryFk,
ct.country,
ct.name AS country,
p.id AS provinceFk,
p.name AS province,
u.id AS salesPersonFk,

View File

@ -69,7 +69,7 @@ module.exports = Self => {
uw.name workerName,
c.creditInsurance,
d.defaulterSinced,
cn.country,
cn.name AS country,
c.countryFk,
pm.name payMethod
FROM vn.defaulter d

View File

@ -61,7 +61,7 @@
rule>
<tpl-item>
{{code}} - {{town.name}} ({{town.province.name}},
{{town.province.country.country}})
{{town.province.country.name}})
</tpl-item>
<append>
<vn-icon-button
@ -83,7 +83,7 @@
value-field="name">
<tpl-item>
{{name}}, {{province.name}}
({{province.country.country}})
({{province.country.name}})
</tpl-item>
</vn-datalist>
<vn-autocomplete vn-id="province" vn-one
@ -94,7 +94,7 @@
show-field="name"
value-field="id"
rule>
<tpl-item>{{name}} ({{country.country}})</tpl-item>
<tpl-item>{{name}} ({{country.name}})</tpl-item>
</vn-autocomplete>
</vn-horizontal>
<vn-horizontal>

View File

@ -74,7 +74,7 @@
rule>
<tpl-item>
{{code}} - {{town.name}} ({{town.province.name}},
{{town.province.country.country}})
{{town.province.country.name}})
</tpl-item>
<append>
<vn-icon-button
@ -96,7 +96,7 @@
value-field="name">
<tpl-item>
{{name}}, {{province.name}}
({{province.country.country}})
({{province.country.name}})
</tpl-item>
</vn-datalist>
<vn-autocomplete vn-id="province" vn-one
@ -107,7 +107,7 @@
show-field="name"
value-field="id"
rule>
<tpl-item>{{name}} ({{country.country}})</tpl-item>
<tpl-item>{{name}} ({{country.name}})</tpl-item>
</vn-autocomplete>
</vn-horizontal>
<vn-horizontal>

View File

@ -50,7 +50,7 @@
<span ng-show="::address.postalCode">{{::address.postalCode}} -</span>
<span ng-show="::address.city">{{::address.city}},</span>
<span ng-show="::address.province.name">{{::address.province.name}},</span>
{{::address.province.country.country}}
{{::address.province.country.name}}
</div>
<div class="ellipsize">
{{::address.phone}}<span ng-if="::address.mobile">, </span>

View File

@ -66,7 +66,7 @@
rule>
<tpl-item>
{{code}} - {{town.name}} ({{town.province.name}},
{{town.province.country.country}})
{{town.province.country.name}})
</tpl-item>
<append>
<vn-icon-button
@ -88,7 +88,7 @@
value-field="name">
<tpl-item>
{{name}}, {{province.name}}
({{province.country.country}})
({{province.country.name}})
</tpl-item>
</vn-datalist>
</vn-horizontal>
@ -101,14 +101,14 @@
url="Provinces/location"
fields="['id', 'name', 'countryFk']"
rule>
<tpl-item>{{name}} ({{country.country}})</tpl-item>
<tpl-item>{{name}} ({{country.name}})</tpl-item>
</vn-autocomplete>
<vn-autocomplete
vn-id="country"
label="Country"
ng-model="$ctrl.client.countryFk"
url="Countries"
show-field="country">
show-field="name">
</vn-autocomplete>
</vn-horizontal>
<vn-horizontal>

View File

@ -16,7 +16,7 @@
auto-load="true"
url="Countries"
data="countries"
order="country">
order="name">
</vn-crud-model>
<vn-crud-model
auto-load="true"
@ -87,7 +87,7 @@
rule>
<tpl-item>
{{code}} - {{town.name}} ({{town.province.name}},
{{town.province.country.country}})
{{town.province.country.name}})
</tpl-item>
<append>
<vn-icon-button
@ -110,7 +110,7 @@
value-field="name">
<tpl-item>
{{name}}, {{province.name}}
({{province.country.country}})
({{province.country.name}})
</tpl-item>
</vn-datalist>
</vn-horizontal>
@ -126,14 +126,14 @@
show-field="name"
value-field="id"
rule>
<tpl-item>{{name}} ({{country.country}})</tpl-item>
<tpl-item>{{name}} ({{country.name}})</tpl-item>
</vn-autocomplete>
<vn-autocomplete
vn-one
vn-id="country"
ng-model="$ctrl.client.countryFk"
data="countries"
show-field="country"
show-field="name"
value-field="id"
label="Country"
rule>

View File

@ -104,7 +104,7 @@
value="{{$ctrl.summary.province.name}}">
</vn-label-value>
<vn-label-value label="Country"
value="{{$ctrl.summary.country.country}}">
value="{{$ctrl.summary.country.name}}">
</vn-label-value>
<vn-label-value label="Street" no-ellipsize
value="{{$ctrl.summary.street}}">

View File

@ -59,7 +59,7 @@ module.exports = Self => {
`CREATE OR REPLACE TEMPORARY TABLE tmp.filter
ENGINE = MEMORY
SELECT co.code company,
cou.country,
cou.name AS country,
robert marked this conversation as resolved Outdated

Quitar el AS

Quitar el AS
c.id clientId,
c.socialName clientSocialName,
u.nickname workerSocialName,

View File

@ -181,7 +181,7 @@
ng-show="!$ctrl.isBuyer && !$ctrl.isAdministrative">
Tax
</h4>
<vn-label-value label="{{tax.country.country}}"
<vn-label-value label="{{tax.country.name}}"
ng-repeat="tax in $ctrl.summary.item.taxes"
value="{{tax.taxClass.description}}">
</vn-label-value>

View File

@ -15,7 +15,7 @@
<vn-textfield
vn-one
label="Country"
ng-model="tax.country.country"
ng-model="tax.country.name"
disabled="true">
</vn-textfield>
<vn-autocomplete

View File

@ -103,7 +103,7 @@ module.exports = Self => {
SELECT t.cmrFk,
t.id ticketFk,
t.routeFk,
co.country,
co.name AS country,
robert marked this conversation as resolved Outdated

Quitar el AS

Quitar el AS
t.clientFk,
IF(sub.id, TRUE, FALSE) hasCmrDms,
DATE(t.shipped) shipped

View File

@ -43,7 +43,7 @@
rule>
<tpl-item>
{{code}} - {{town.name}} ({{town.province.name}},
{{town.province.country.country}})
{{town.province.country.name}})
</tpl-item>
<append>
<vn-icon-button
@ -65,7 +65,7 @@
value-field="name">
<tpl-item>
{{name}}, {{province.name}}
({{province.country.country}})
({{province.country.name}})
</tpl-item>
</vn-datalist>
<vn-autocomplete vn-id="province" vn-one
@ -76,7 +76,7 @@
show-field="name"
value-field="id"
rule>
<tpl-item>{{name}} ({{country.country}})</tpl-item>
<tpl-item>{{name}} ({{country.name}})</tpl-item>
</vn-autocomplete>
</vn-horizontal>
<vn-horizontal>

View File

@ -41,7 +41,7 @@
rule>
<tpl-item>
{{code}} - {{town.name}} ({{town.province.name}},
{{town.province.country.country}})
{{town.province.country.name}})
</tpl-item>
<append>
<vn-icon-button
@ -63,7 +63,7 @@
value-field="name">
<tpl-item>
{{name}}, {{province.name}}
({{province.country.country}})
({{province.country.name}})
</tpl-item>
</vn-datalist>
<vn-autocomplete vn-id="province" vn-one
@ -74,7 +74,7 @@
show-field="name"
value-field="id"
rule>
<tpl-item>{{name}} ({{country.country}})</tpl-item>
<tpl-item>{{name}} ({{country.name}})</tpl-item>
</vn-autocomplete>
</vn-horizontal>
<vn-horizontal>

View File

@ -16,7 +16,7 @@
auto-load="true"
url="Countries"
data="countries"
order="country">
order="name">
</vn-crud-model>
<vn-crud-model
auto-load="true"
@ -143,7 +143,7 @@
rule>
<tpl-item>
{{code}} - {{town.name}} ({{town.province.name}},
{{town.province.country.country}})
{{town.province.country.name}})
</tpl-item>
<append>
<vn-icon-button
@ -172,7 +172,7 @@
rule>
<tpl-item>
{{name}}, {{province.name}}
({{province.country.country}})
({{province.country.name}})
</tpl-item>
</vn-datalist>
<vn-autocomplete
@ -187,7 +187,7 @@
show-field="name"
value-field="id"
rule>
<tpl-item>{{name}} ({{country.country}})</tpl-item>
<tpl-item>{{name}} ({{country.name}})</tpl-item>
</vn-autocomplete>
</vn-horizontal>
<vn-horizontal>
@ -198,7 +198,7 @@
vn-name="country"
ng-model="$ctrl.supplier.countryFk"
data="countries"
show-field="country"
show-field="name"
value-field="id"
rule>
</vn-autocomplete>

View File

@ -162,7 +162,7 @@
</vn-label-value>
<vn-label-value
label="Country"
value="{{::$ctrl.summary.country.country}}">
value="{{::$ctrl.summary.country.name}}">
</vn-label-value>
</vn-one>
</vn-horizontal>

View File

@ -65,7 +65,7 @@
rule>
<tpl-item>
{{code}} - {{town.name}} ({{town.province.name}},
{{town.province.country.country}})
{{town.province.country.name}})
</tpl-item>
<append>
<vn-icon-button
@ -85,7 +85,7 @@
url="Provinces/location"
fields="['id', 'name', 'countryFk']"
rule>
<tpl-item>{{name}} ({{country.country}})</tpl-item>
<tpl-item>{{name}} ({{country.name}})</tpl-item>
</vn-autocomplete>
</vn-horizontal>
<vn-horizontal>
@ -99,7 +99,7 @@
value-field="name">
<tpl-item>
{{name}}, {{province.name}}
({{province.country.country}})
({{province.country.name}})
</tpl-item>
</vn-datalist>
<vn-textfield

View File

@ -37,7 +37,7 @@
{{code}} {{town.name}}
</div>
<div class="text-caption text-secondary">
{{town.province.name}}, {{town.province.country.country}}
{{town.province.name}}, {{town.province.country.name}}
</div>
</tpl-item>
</vn-autocomplete>

View File

@ -6,7 +6,7 @@ SELECT
c.id,
c.name AS clientName,
p.name AS province,
co.country
co.name AS country
FROM client c
JOIN province p ON c.provinceFk = p.id
JOIN country co ON c.countryFk = co.id

View File

@ -8,7 +8,7 @@ SELECT
a.street,
a.nickname,
p.name AS province,
ct.country,
ct.name AS country,
IFNULL(c.phone, cc.phone) AS phone
FROM claim cl
JOIN client c ON c.id = cl.clientFk

View File

@ -6,7 +6,7 @@ SELECT
c.city,
c.fi,
p.name AS province,
ct.country
ct.name AS country
FROM client c
JOIN country ct ON ct.id = c.countryFk
LEFT JOIN province p ON p.id = c.provinceFk

View File

@ -14,12 +14,12 @@ SELECT c.id cmrFk,
s.street carrierStreet,
s.postCode carrierPostCode,
s.city carrierCity,
cou.country carrierCountry,
cou.name carrierCountry,
s2.name senderName,
s2.street senderStreet,
s2.postCode senderPostCode,
s2.city senderCity,
cou2.country senderCountry,
cou2.name senderCountry,
a.street deliveryStreet,
a.id deliveryAddressFk,
a.postalCode deliveryPostalCode,
@ -27,12 +27,12 @@ SELECT c.id cmrFk,
a.nickname deliveryName,
a.phone deliveryPhone,
a.mobile deliveryMobile,
cou3.country deliveryCountry,
cou3.name deliveryCountry,
cl.phone clientPhone,
a2.street loadStreet,
a2.postalCode loadPostalCode,
a2.city loadCity,
cou4.country loadCountry,
cou4.name loadCountry,
co.stamp senderStamp,
s.stamp deliveryStamp
FROM cmr c

View File

@ -4,7 +4,7 @@ SELECT
c.name,
c.fi,
c.street,
cty.country
cty.name AS country
robert marked this conversation as resolved Outdated

Quitar AS

Quitar AS
FROM client c
JOIN country cty ON cty.id = c.countryFk
WHERE c.id = ?

View File

@ -6,7 +6,7 @@ SELECT
c.city,
c.fi,
p.name AS province,
ct.country
ct.name AS country
FROM client c
JOIN country ct ON ct.id = c.countryFk
LEFT JOIN province p ON p.id = c.provinceFk

View File

@ -7,7 +7,7 @@ SELECT
c.city,
c.fi,
p.name AS province,
ct.country,
ct.name AS country,
ct.code AS countryCode,
ct.ibanLength AS ibanLength
FROM client c

View File

@ -2,7 +2,7 @@ SELECT
m.code mandateCode,
s.name,
s.street,
sc.country,
sc.name AS country,
robert marked this conversation as resolved Outdated

Quitar AS

Quitar AS
s.postCode,
s.city,
sp.name province,

View File

@ -5,7 +5,7 @@ SELECT
s.id,
s.name AS supplierName,
p.name AS province,
co.country
co.name AS country
robert marked this conversation as resolved Outdated

Quitar AS

Quitar AS
FROM supplier s
JOIN province p ON s.provinceFk = p.id
JOIN country co ON s.countryFk = co.id