Skip to content

Commit

Permalink
using letter uuid for letter filetype
Browse files Browse the repository at this point in the history
  • Loading branch information
horatiorosa committed Nov 25, 2024
1 parent b79bead commit 054a0db
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions client/app/services/file-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ export default class FileManager {
}

async uploadFiles() {
console.log(`hello uploader`, this.recordId);

Check failure on line 65 in client/app/services/file-manager.js

View workflow job for this annotation

GitHub Actions / 🧪 Test client code

Strings must use singlequote

Check failure on line 65 in client/app/services/file-manager.js

View workflow job for this annotation

GitHub Actions / 🧪 Test client code

Strings must use singlequote
for (let i = 0; i < this.filesToUpload.files.length; i += 1) {
await this.filesToUpload.files[i].upload(`${ENV.host}/documents/${this.entityType}`, { // eslint-disable-line
fileKey: 'file',
Expand Down
9 changes: 5 additions & 4 deletions server/src/artifacts/artifacts.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@ import { ConfigService } from '../config/config.service';
@Injectable()
export class ArtifactService {
rerFiletypeUuid = '';
letterFiletypeUuid= '';

constructor(
private readonly crmService: CrmService,
private readonly sharepointService: SharepointService,
private readonly config: ConfigService,
) {
this.rerFiletypeUuid = this.config.get('RER_FILETYPE_UUID');
this.letterFiletypeUuid = this.config.get('LETTER_FILETYPE_UUID');
}

public async createEquityReport(projectId: string) {
Expand Down Expand Up @@ -56,13 +58,12 @@ export class ArtifactService {
dcp_filecreator: 717170000, // Applicant
dcp_filecategory: 717170006, // Other
dcp_visibility: 717170002, // Applicant Only
'[email protected]': `/dcp_filetypes(${'letter'})`,
'[email protected]': `/dcp_filetypes(${this.letterFiletypeUuid})`,
...(projectId
? { '[email protected]': `/dcp_projects(${projectId})` }
: {}),
});
console.debug('new artifact in artifact service', newArtifact);

});
console.debug('new artifact in artifact service', await newArtifact);
} catch (e) {
throw new HttpException(
{
Expand Down
3 changes: 2 additions & 1 deletion server/src/projects/projects.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,8 @@ export class ProjectsController {
let firstArtifactWithDocuments = {};
const newProject = await this.projectsService.create(allowedAttrs);
console.log(
`project id in projects controller: ${newProject.dcp_projectid}`,
`project id in
projects controller: ${newProject.dcp_projectid}`,
);
try {
firstArtifactWithDocuments =
Expand Down

0 comments on commit 054a0db

Please sign in to comment.