Merge pull request '3644-feat(client_descriptor): add supplier quick-link' (#892) from 3644-client_descriptor into dev
gitea/salix/pipeline/head This commit looks good Details

Reviewed-on: #892
Reviewed-by: Carlos Jimenez Ruiz <carlosjr@verdnatura.es>
This commit is contained in:
Carlos Jimenez Ruiz 2022-03-08 08:50:22 +00:00
commit 9826278829
5 changed files with 24 additions and 3 deletions

View File

@ -97,7 +97,8 @@ ngModule.vnComponent('vnDescriptor', {
btnOne: '?btnOne',
btnTwo: '?btnTwo',
btnThree: '?btnThree',
btnFour: '?btnFour'
btnFour: '?btnFour',
btnFive: '?btnFive'
}
});

View File

@ -104,7 +104,7 @@ vn-descriptor-content {
align-items: center;
justify-content: center;
padding: 0 $spacing-sm;
margin: 0 $spacing-sm;
margin: 0 $spacing-xs;
& > vn-icon {
font-size: 1.75rem;

View File

@ -64,6 +64,12 @@ module.exports = function(Self) {
scope: {
fields: ['id', 'name', 'active']
}
},
{
relation: 'supplier',
scope: {
fields: ['id', 'nif']
}
}
]
}, myOptions);

View File

@ -228,6 +228,12 @@
"type": "belongsTo",
"model": "Client",
"foreignKey": "transferorFk"
},
"supplier": {
"type": "belongsTo",
"model": "Supplier",
"foreignKey": "fi",
"primaryKey": "nif"
}
},
"scopes": {

View File

@ -101,6 +101,14 @@
icon="face">
</vn-quick-link>
</div>
<div ng-transclude="btnFive">
<vn-quick-link
ng-if="$ctrl.client.supplier.nif"
tooltip="Go to client"
state="['supplier.card.summary', {id: $ctrl.client.supplier.id}]"
icon="icon-supplier">
</vn-quick-link>
</div>
</div>
</slot-body>
</vn-descriptor-content>