This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
import { ComponentFixture, TestBed } from '@angular/core/testing'; | |
import { RealPropertyCommentListComponent } from './real-property-comment-list.component'; | |
import { MessageService } from "primeng/api"; | |
import { PrincipalService } from "@app/principal/service/principal.service"; | |
import { DeviceService } from "@helpers/device.service"; | |
import { DATA_MANAGER_URI, USER_MANAGER_URI, VIEW_MANAGER_URI } from "../../const"; | |
import { environment } from "@environments/environment.prod"; | |
import { NO_ERRORS_SCHEMA } from "@angular/core"; | |
import { RealPropertyCommentListService } from "@modules/real-property-comments/real-property-comment-list.service"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Step 1: generate docx | |
var JSZip = require('jszip'); | |
var Docxtemplater = require('docxtemplater'); | |
var fs = require('fs'); | |
var path = require('path'); | |
//Load the docx file as a binary | |
var content = fs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ns-button label="Button Label"></ns-button> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const resolvers = { | |
Query: { | |
bookList: () => { | |
return { | |
count: (obj, args, ctx, info) => BookController.getBookListCount(), | |
nodes: (obj, args, ctx, info) => BookController.getBookList(), | |
} | |
}, | |
book: (obj, args, ctx, info) => BookController.getBook(args['id']), | |
authorList: (obj, args, ctx, info) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mutation createBook($data: BookInput!) { | |
createBook(data: $data) { | |
id | |
title | |
description | |
} | |
} | |
{ | |
"data": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
query bookList { | |
bookList { | |
count | |
nodes { | |
id | |
title | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Query { | |
bookList: [BookList!] | |
book(id: ID!): Book | |
authorList: [AuthorList!] | |
author(id: ID!): Author | |
} | |
type Book { | |
id: ID! | |
title: String! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const authorResolver = (obj, args, ctx, info) => AuthorController.getAuthor(args['id]); | |
function bookResolver(obj, args, ctx, info) { | |
return BookController.getBook(args['id') | |
} |