#2051 - DMS unify methods #1888
No reviewers
Labels
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: verdnatura/salix#1888
Loading…
Reference in New Issue
No description provided.
Delete Branch "2051_dms_methods_refactor"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@ -35,3 +35,3 @@
try {
const dms = await models.Dms.findById(id, null, myOptions);
let modelDms = null;
dejar el codigo como estaba, y que el que llama pase el dmsFk
@ -40,3 +42,1 @@
await targetClaimDms.destroy(myOptions);
await targetDms.updateAttribute('dmsTypeFk', trashDmsType.id, myOptions);
// await targetDms.updateAttribute('dmsTypeFk', trashDmsType.id, myOptions);
dejar aquí lo que aplica al modelo claim-dms y lo otro moverlo a dms
@ -0,0 +2,4 @@
import Component from 'core/lib/component';
import './style.scss';
export default class SectionDms extends Component {
extends section
WIP: #2051 - DMS unify methodsto #2051 - DMS unify methods@ -2,2 +2,3 @@
describe('TicketDms removeFile()', () => {
// f
fdescribe('TicketDms removeFile()', () => {
esto sin f
@ -40,0 +38,4 @@
if (!targetDms || !clientDms)
throw new UserError('Try again');
const clientDestroyed = await clientDms.destroy(myOptions);
ya que cambiamos el nombre de la variable, para mi queda mas claro,
clientDmsDestroyed porque en realidad no se elimina un cliente sino la relacion entre cliente y dms
@ -2,2 +2,3 @@
describe('ClientDms removeFile()', () => {
// f
fdescribe('ClientDms removeFile()', () => {
sin f
@ -43,0 +38,4 @@
if (!targetDms || !ticketDms)
throw new UserError('Try again');
const ticketDestroyed = await ticketDms.destroy(myOptions);
ticketDmsDestroyed o si lo quieres generico selfDestroyed...
He usado la misma sintaxis para todo %modelo%DmsDestroyed
@ -24,2 +24,4 @@
expect(error.message).toEqual(`You don't have enough privileges`);
});
// fit(`should uploadFile`, async() => {
elimina el codigo comentado
#2051 - DMS unify methodsto WIP: #2051 - DMS unify methodsWIP: #2051 - DMS unify methodsto #2051 - DMS unify methodsNew commits pushed, approval review dismissed automatically according to repository settings
@ -21,3 +21,1 @@
Self.removeFile = async(ctx, id) => {
const models = Self.app.models;
const workerDms = await Self.findById(id);
Self.removeFile = async(ctx, id, options) => {
renombrar id por dmsFk