Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 2615-waste_detail

This commit is contained in:
Joan Sanchez 2021-04-06 09:14:11 +02:00
commit 5ef3ff40ce
9 changed files with 50 additions and 30 deletions

View File

@ -66,15 +66,38 @@ For end-to-end tests run from project's root.
$ gulp e2e
```
## Recommended tools
## Visual Studio Code extensions
* Visual Studio Code
Open Visual Studio Code, press Ctrl+P and paste the following commands.
In Visual Studio Code we use the ESLint extension. Open Visual Studio Code, press Ctrl+P and paste the following command.
In Visual Studio Code we use the ESLint extension.
```
ext install dbaeumer.vscode-eslint
```
Gitlens for visualization of code authorship
```
ext install eamodio.gitlens
```
Spanish language pack
```
ext install ms-ceintl.vscode-language-pack-es
```
### Recommended extensions
Material icon Theme
```
ext install pkief.material-icon-theme
```
Material UI Themes
```
ext install equinusocio.vsc-material-theme
```
## Built With
* [angularjs](https://angularjs.org/)

View File

@ -2,7 +2,7 @@
.vn-descriptor-popover {
vn-descriptor-content > .descriptor {
width: 260px;
width: 256px;
& > .header > a:first-child {
visibility: hidden;

View File

@ -11,7 +11,7 @@ vn-descriptor-content {
& > img[ng-src] {
min-height: 16em;
display: block;
width: 256px;
max-width: 100%;
height: 256px;
}

View File

@ -13,12 +13,10 @@
<vn-th field="landed" center expand>Landed</vn-th>
<vn-th>Reference</vn-th>
<vn-th field="supplierFk">Supplier</vn-th>
<vn-th field="currencyFk" center>Currency</vn-th>
<vn-th field="companyFk" center>Company</vn-th>
<vn-th field="isBooked" center>Booked</vn-th>
<vn-th field="isConfirmed" center>Confirmed</vn-th>
<vn-th field="isOrdered" center>Ordered</vn-th>
<vn-th>Notes</vn-th>
<vn-th shrink></vn-th>
</vn-tr>
</vn-thead>
<vn-tbody>
@ -49,18 +47,15 @@
</vn-td>
<vn-td expand>{{::entry.ref}}</vn-td>
<vn-td expand>{{::entry.supplierName}}</vn-td>
<vn-td center expand>{{::entry.currencyCode}}</vn-td>
<vn-td center expand>{{::entry.companyCode}}</vn-td>
<vn-td center><vn-check ng-model="entry.isBooked" disabled="true"></vn-check></vn-td>
<vn-td center><vn-check ng-model="entry.isConfirmed" disabled="true"></vn-check></vn-td>
<vn-td center><vn-check ng-model="entry.isOrdered" disabled="true"></vn-check></vn-td>
<vn-td shrink>
<vn-icon
ng-if="entry.notes.length"
vn-tooltip="{{::entry.notes}}"
icon="insert_drive_file"
class="bright">
</vn-icon>
<vn-icon-button
vn-click-stop="$ctrl.preview(entry)"
vn-tooltip="Preview"
icon="preview">
</vn-icon-button>
</vn-td>
</a>
</vn-tbody>
@ -70,7 +65,11 @@
<vn-travel-descriptor-popover
vn-id="travelDescriptor">
</vn-travel-descriptor-popover>
<vn-popup vn-id="summary">
<vn-entry-summary
entry="$ctrl.entrySelected">
</vn-entry-summary>
</vn-popup>
<div fixed-bottom-right>
<vn-vertical style="align-items: center;">
<a ui-sref="entry.create" vn-bind="+">

View File

@ -1,7 +1,12 @@
import ngModule from '../module';
import Section from 'salix/components/section';
export default class Controller extends Section {}
export default class Controller extends Section {
preview(entry) {
this.entrySelected = entry;
this.$.summary.show();
}
}
ngModule.vnComponent('vnEntryIndex', {
template: require('./index.html'),

View File

@ -50,6 +50,8 @@
vn-tooltip="Preview"
icon="preview">
</vn-icon-button>
</vn-td>
<vn-td shrink>
<vn-icon-button
ng-show="invoiceIn.dmsFk"
vn-click-stop="$ctrl.openPdf(invoiceIn.dmsFk)"

View File

@ -50,8 +50,9 @@ module.exports = Self => {
const fileName = srcFile.replace(/\.|\/|:|\?|\\|=|%/g, '');
const file = `${fileName}.png`;
const filePath = path.join(tempPath, file);
const imageUrl = image.url.replace('http://', 'https://');
https.get(image.url, async response => {
https.get(imageUrl, async response => {
if (response.statusCode != 200) {
const error = new Error(`Could not download the image. Status code ${response.statusCode}`);

View File

@ -1,6 +1,5 @@
import ngModule from '../module';
import Descriptor from 'salix/components/descriptor';
import './style.scss';
class Controller extends Descriptor {
constructor($element, $, $rootScope) {

View File

@ -1,9 +0,0 @@
vn-item-descriptor {
img[ng-src] {
min-height: 16em;
height: 100%;
width: 100%;
display: block;
}
}