0
0
Fork 0

Merge branch 'master' into hotfix_itemFixedPrice

This commit is contained in:
Javier Segarra 2024-12-09 07:05:18 +00:00
commit e0bc14e3f7
8 changed files with 37 additions and 18 deletions

6
Jenkinsfile vendored
View File

@ -4,7 +4,8 @@ def PROTECTED_BRANCH
def BRANCH_ENV = [
test: 'test',
master: 'production'
master: 'production',
beta: 'production'
]
node {
@ -15,7 +16,8 @@ node {
PROTECTED_BRANCH = [
'dev',
'test',
'master'
'master',
'beta'
].contains(env.BRANCH_NAME)
// https://www.jenkins.io/doc/book/pipeline/jenkinsfile/#using-environment-variables

View File

@ -2,7 +2,7 @@
import CreateNewPostcode from 'src/components/CreateNewPostcodeForm.vue';
import VnSelectDialog from 'components/common/VnSelectDialog.vue';
import { useI18n } from 'vue-i18n';
import { ref } from 'vue';
import { computed } from 'vue';
import { useAttrs } from 'vue';
import { useRequired } from 'src/composables/useRequired';
const { t } = useI18n();
@ -43,7 +43,7 @@ const formatLocation = (obj, properties) => {
return filteredParts.join(', ');
};
const modelValue = ref(
const modelValue = computed(() =>
props.location ? formatLocation(props.location, locationProperties) : null
);

View File

@ -20,7 +20,7 @@ export function useRole() {
function hasAny(roles) {
const roleStore = state.getRoles();
if (typeof roles === 'string') roles = [roles];
for (const role of roles) {
if (roleStore.value.indexOf(role) !== -1) return true;
}

View File

@ -29,7 +29,8 @@ async function hasCustomerRole() {
:filter="filter"
model="customer"
:mapper="
({ active, name, email }) => {
({ account }) => {
const { name, email, active } = account;
return {
active,
name,

View File

@ -37,7 +37,7 @@ const columns = computed(() => [
},
isId: true,
columnFilter: {
name: 'search',
name: 'id',
},
},
{
@ -74,7 +74,9 @@ const columns = computed(() => [
component: 'select',
attrs: {
url: 'Clients',
fields: ['id', 'name'],
fields: ['id', 'socialName'],
optionLabel: 'socialName',
optionValue: 'id',
},
columnField: {
component: null,

View File

@ -760,7 +760,7 @@ watch(
</template>
<template #column-item="{ row }">
<div class="row column full-width justify-between items-start">
{{ row?.item?.name }}
{{ row?.concept }}
<div v-if="row?.item?.subName" class="subName">
{{ row?.item?.subName.toUpperCase() }}
</div>

View File

@ -11,7 +11,7 @@ import VnInput from 'src/components/common/VnInput.vue';
import useNotify from 'src/composables/useNotify.js';
import axios from 'axios';
import { toDateFormat } from 'src/filters/date';
import { useRole } from 'src/composables/useRole';
import { useAcl } from 'src/composables/useAcl';
import { useVnConfirm } from 'composables/useVnConfirm';
const emit = defineEmits(['updateDiscounts', 'getMana', 'refreshTable']);
@ -48,7 +48,7 @@ const { push } = useRouter();
const { t } = useI18n();
const { dialog } = useQuasar();
const { notify } = useNotify();
const role = useRole();
const acl = useAcl();
const btnDropdownRef = ref(null);
const { openConfirmationModal } = useVnConfirm();
@ -58,8 +58,10 @@ const isClaimable = computed(() => {
if (ticket.value) {
const landedPlusWeek = new Date(ticket.value.landed);
landedPlusWeek.setDate(landedPlusWeek.getDate() + 7);
const hasClaimManagerRole = role.hasAny('claimManager');
return landedPlusWeek >= Date.vnNew() || hasClaimManagerRole;
const createAfterDeadline = acl.hasAny([
{ model: 'Claim', props: 'createAfterDeadline', accessType: 'WRITE' },
]);
return landedPlusWeek >= Date.vnNew() || createAfterDeadline;
}
return false;
});

View File

@ -57,7 +57,7 @@ const travelKgPercentages = ref([]);
const tableColumnComponents = {
id: {
component: QBtn,
attrs: { flat: true, color: 'primary' },
attrs: { flat: true, color: 'primary', dense: true },
},
cargoSupplierNickname: {
component: QBtn,
@ -178,6 +178,7 @@ const columns = computed(() => [
align: 'left',
showValue: false,
sortable: true,
style: 'min-width: 170px;',
},
{
label: t('globals.packages'),
@ -237,7 +238,7 @@ const columns = computed(() => [
format: (value) => toDate(value),
},
{
label: t('globals.wareHhuseIn'),
label: t('globals.warehouseIn'),
field: 'warehouseInName',
name: 'warehouseInName',
align: 'left',
@ -506,7 +507,7 @@ const getColor = (percentage) => {
:key="col.name"
:props="props"
@click="stopEventPropagation($event, col)"
auto-width
:style="col.style"
>
<component
:is="tableColumnComponents[col.name].component"
@ -581,7 +582,7 @@ const getColor = (percentage) => {
}"
>
<QTd>
<QBtn flat class="link">{{ entry.id }} </QBtn>
<QBtn dense flat class="link">{{ entry.id }} </QBtn>
<EntryDescriptorProxy :id="entry.id" />
</QTd>
<QTd>
@ -637,6 +638,18 @@ const getColor = (percentage) => {
:deep(.q-table) {
border-collapse: collapse;
th {
padding: 0;
}
tbody tr td {
&:nth-child(1) {
max-width: 65px;
}
&:nth-child(4) {
padding: 0;
}
}
}
.q-td :deep(input) {
@ -684,7 +697,6 @@ const getColor = (percentage) => {
width: max-content;
}
</style>
<i18n>
en:
searchExtraCommunity: Search for extra community shipping