@duvdu-v1/duvdu 1.1.64 → 1.1.66

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -23,11 +23,11 @@
23
23
  /// <reference types="mongoose/types/virtuals" />
24
24
  /// <reference types="mongoose/types/inferschematype" />
25
25
  import { Document, Types } from 'mongoose';
26
+ import { Icategory } from '../types/Category';
26
27
  export interface IteamProject extends Document {
27
28
  user: Types.ObjectId;
28
29
  cover: string;
29
30
  title: string;
30
- category: Types.ObjectId;
31
31
  budget: number;
32
32
  desc: string;
33
33
  location: {
@@ -41,7 +41,7 @@ export interface IteamProject extends Document {
41
41
  status: 'pending' | 'completed';
42
42
  creatives: [
43
43
  {
44
- jobTitle: string;
44
+ category: Types.ObjectId | Icategory;
45
45
  users: [
46
46
  {
47
47
  user: Types.ObjectId;
@@ -27,10 +27,10 @@ const UserSchema = new mongoose_1.Schema({
27
27
  }
28
28
  });
29
29
  const CreativeSchema = new mongoose_1.Schema({
30
- jobTitle: {
31
- type: String,
30
+ category: {
31
+ type: mongoose_1.Schema.Types.ObjectId,
32
32
  required: true,
33
- default: null
33
+ ref: model_names_1.MODELS.category
34
34
  },
35
35
  users: [UserSchema]
36
36
  });
@@ -47,10 +47,6 @@ exports.TeamProject = (0, mongoose_1.model)(model_names_1.MODELS.teamProject, ne
47
47
  type: String,
48
48
  default: null
49
49
  },
50
- category: {
51
- type: mongoose_1.Schema.Types.ObjectId,
52
- ref: model_names_1.MODELS.category
53
- },
54
50
  budget: {
55
51
  type: Number,
56
52
  default: null
@@ -66,4 +66,5 @@ export declare const permissions: {
66
66
  copyrights: PERMISSIONS[];
67
67
  studioBooking: PERMISSIONS[];
68
68
  booking: PERMISSIONS[];
69
+ teamProject: PERMISSIONS[];
69
70
  };
@@ -127,4 +127,13 @@ exports.permissions = {
127
127
  PERMISSIONS.getStudioAnalysisHandler,
128
128
  ],
129
129
  booking: [PERMISSIONS.booking],
130
+ teamProject: [
131
+ PERMISSIONS.createTeamProjectHandler,
132
+ PERMISSIONS.deleteTeamProjectCreativeHandler,
133
+ PERMISSIONS.getTeamProjectAnalysisHandler,
134
+ PERMISSIONS.getCrmTeamProjectHandler,
135
+ PERMISSIONS.updateTeamProjectCreativeHandler,
136
+ PERMISSIONS.deleteTeamProjectHandler,
137
+ PERMISSIONS.updateTeamProjectHandler,
138
+ ]
130
139
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@duvdu-v1/duvdu",
3
- "version": "1.1.64",
3
+ "version": "1.1.66",
4
4
  "main": "./build/index.js",
5
5
  "types": "./build/index.d.ts",
6
6
  "files": [