#7648 - Customer View Entries #2659

Merged
jsegarra merged 17 commits from 7648_dev_customerEntries into dev 2024-07-03 07:29:02 +00:00
Member
No description provided.
jsegarra added 2 commits 2024-07-01 12:21:28 +00:00
jsegarra added 1 commit 2024-07-01 12:29:30 +00:00
gitea/salix/pipeline/pr-dev This commit looks good Details
0035967b11
Merge branch 'dev' into 7648_dev_customerEntries
jsegarra requested review from jgallego 2024-07-01 12:29:54 +00:00
jsegarra changed title from WIP: #7648 - Customer View Entries to #7648 - Customer View Entries 2024-07-01 12:29:59 +00:00
jgallego requested changes 2024-07-01 13:34:28 +00:00
Dismissed
@ -0,0 +1,10 @@
-- Place your SQL code here
-- Auto-generated SQL script #202406281423
INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId)
VALUES ('Entry','filter','READ','ALLOW','ROLE','$authenticated');
Owner

Creo que esto si eres un customer te dejaria ver todas la entries
solucion:
VALUES ('Entry','filter','READ','ALLOW','ROLE','supplier');

Crear rol supplier que hereda de account igual que customer.

Creo que esto si eres un customer te dejaria ver todas la entries solucion: VALUES ('Entry','filter','READ','ALLOW','ROLE','supplier'); Crear rol supplier que hereda de account igual que customer.
Author
Member
a0185dca0486a339ba41ab8822ff4e767e19be1b
jsegarra marked this conversation as resolved
@ -36,1 +40,4 @@
if (isSupplier) {
const isEntryOwner = (await Self.findById(id)).supplierFk === ctx.req.accessToken.userId;
if (! isEntryOwner) throw new UserError('Access Denied');
Owner

!

!
jsegarra marked this conversation as resolved
@ -86,2 +107,3 @@
}]
};
delete filter.order;
Owner

quitar

quitar
jsegarra marked this conversation as resolved
@ -0,0 +1,28 @@
const UserError = require('vn-loopback/util/user-error');
Owner

eliminar fichero

eliminar fichero
jsegarra marked this conversation as resolved
@ -12,6 +12,7 @@ module.exports = Self => {
require('../methods/supplier/campaignMetricsEmail')(Self);
require('../methods/supplier/newSupplier')(Self);
require('../methods/supplier/getItemsPackaging')(Self);
require('../methods/supplier/isSupplier')(Self);
Owner

eliminar

eliminar
jsegarra marked this conversation as resolved
jsegarra added 2 commits 2024-07-01 19:14:33 +00:00
jsegarra added 4 commits 2024-07-02 08:07:35 +00:00
jsegarra requested review from jgallego 2024-07-02 08:08:13 +00:00
jsegarra added 1 commit 2024-07-02 08:08:58 +00:00
gitea/salix/pipeline/pr-dev Build queued... Details
3539b5a33e
test(salix): refs #7648 #7648 remove fdescribe
jgallego approved these changes 2024-07-02 16:05:10 +00:00
Dismissed
@ -177,0 +180,4 @@
cu.code AS currencyCode,
t.shipped AS shipped,
t.landed AS landed,
t.warehouseInFk AS warehouseId,
Owner

se podria devolver el warehouseInFk tal cual sin el alias..lo apruebo porque no es un fallo, pero si lo ves mas conveniente lo cambias para la proxima

se podria devolver el warehouseInFk tal cual sin el alias..lo apruebo porque no es un fallo, pero si lo ves mas conveniente lo cambias para la proxima
Author
Member

Lo cambio porque tampoco es correcto que t.shipped y t.landed lleven alias.
Además, queremos mostrar el almacén de entrada así que el alias de warehouseName no es correcto, debería ser warehouseInName,
Puede llevar a confusión, así que lo cambio

Lo cambio porque tampoco es correcto que t.shipped y t.landed lleven alias. Además, queremos mostrar el almacén de entrada así que el alias de warehouseName no es correcto, debería ser warehouseInName, Puede llevar a confusión, así que lo cambio
jsegarra marked this conversation as resolved
jsegarra added 2 commits 2024-07-02 18:41:58 +00:00
jsegarra added 1 commit 2024-07-02 23:46:07 +00:00
gitea/salix/pipeline/pr-dev This commit looks good Details
adbbe4aef9
fix(salix): refs #7648 #7648 solve big bug
jsegarra requested review from jgallego 2024-07-02 23:48:34 +00:00
jgallego requested changes 2024-07-03 05:39:24 +00:00
Dismissed
@ -3914,2 +3914,4 @@
VALUES(1, 1, 0, ' ', ' ', ' ', ' ', 0, '2001-01-01 00:00:00', 1, 0, ' ', ' ', 0, NULL, '', NULL, 0.000, NULL, 10, NULL, NULL, 'NCC', NULL);
UPDATE account.`user`
SET `role`=131
Owner

para que sirve esto?
hasta cuando se quedara en las fixtures?

para que sirve esto? hasta cuando se quedara en las fixtures?
Author
Member

para que el usuario customer de entorno local sea de tipo supplier, que hereda de customer.
Me parecía demasiado crear un usuario aposta, y como hereda roles, es transparente al desarrollador

para que el usuario customer de entorno local sea de tipo supplier, que hereda de customer. Me parecía demasiado crear un usuario aposta, y como hereda roles, es transparente al desarrollador
Author
Member

Eliminado el cambio beff905e02

Eliminado el cambio beff905e02bfb6b2d074eb122d0e01f8c9668ec8
@ -174,3 +178,3 @@
s.nickname AS supplierAlias,
co.code AS companyCode,
cu.code AS currencyCode
cu.code AS currencyCode,
Owner

por convencion va sin AS
cu.code currencyCode,
esta linea y las demás tb

por convencion va sin AS `cu.code currencyCode,` esta linea y las demás tb
Author
Member
https://gitea.verdnatura.es/verdnatura/salix/commit/946d6f553af0be220e5b9d882397c6fda4252daf
jsegarra marked this conversation as resolved
jsegarra added 1 commit 2024-07-03 06:17:16 +00:00
gitea/salix/pipeline/pr-dev This commit looks good Details
946d6f553a
perf(salix): refs #7648 #7648 sql conventions
jsegarra added 1 commit 2024-07-03 06:17:37 +00:00
gitea/salix/pipeline/pr-dev This commit looks good Details
5c73a20f43
Merge branch 'dev' into 7648_dev_customerEntries
jsegarra requested review from jgallego 2024-07-03 06:18:38 +00:00
jsegarra added 2 commits 2024-07-03 06:55:14 +00:00
jgallego approved these changes 2024-07-03 07:22:53 +00:00
jsegarra merged commit d72a52d6b1 into dev 2024-07-03 07:29:02 +00:00
jsegarra deleted branch 7648_dev_customerEntries 2024-07-03 07:29:02 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: verdnatura/salix#2659
No description provided.