@dssp/supervision 0.0.8 → 0.0.10
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.
- package/client/pages/building-inspection/building-inspection-detail-checklist.ts +186 -0
- package/client/pages/building-inspection/building-inspection-detail-drawing.ts +160 -0
- package/client/pages/building-inspection/building-inspection-list.ts +430 -0
- package/client/pages/building-inspection/component/building-inspection-detail-header.ts +94 -0
- package/client/pages/building-inspection/inspection-create-popup.ts +696 -0
- package/client/pages/checklist/checklist-view.ts +443 -0
- package/client/pages/checklist-template/checklist-template-item.ts +240 -0
- package/client/pages/checklist-template/checklist-template-list.ts +271 -0
- package/client/pages/checklist-template/checklist-type-management.ts +242 -0
- package/client/route.ts +14 -18
- package/dist-client/pages/building-inspection/building-inspection-detail-checklist.d.ts +21 -0
- package/dist-client/pages/building-inspection/building-inspection-detail-checklist.js +187 -0
- package/dist-client/pages/building-inspection/building-inspection-detail-checklist.js.map +1 -0
- package/dist-client/pages/building-inspection/building-inspection-detail-drawing.d.ts +21 -0
- package/dist-client/pages/building-inspection/building-inspection-detail-drawing.js +169 -0
- package/dist-client/pages/building-inspection/building-inspection-detail-drawing.js.map +1 -0
- package/dist-client/pages/building-inspection/building-inspection-list.d.ts +67 -0
- package/dist-client/pages/building-inspection/building-inspection-list.js +434 -0
- package/dist-client/pages/building-inspection/building-inspection-list.js.map +1 -0
- package/dist-client/pages/building-inspection/component/building-inspection-detail-header.d.ts +1 -0
- package/dist-client/pages/building-inspection/component/building-inspection-detail-header.js +118 -0
- package/dist-client/pages/building-inspection/component/building-inspection-detail-header.js.map +1 -0
- package/dist-client/pages/building-inspection/inspection-create-popup.d.ts +3 -0
- package/dist-client/pages/building-inspection/inspection-create-popup.js +735 -0
- package/dist-client/pages/building-inspection/inspection-create-popup.js.map +1 -0
- package/dist-client/pages/checklist/checklist-view.d.ts +6 -0
- package/dist-client/pages/checklist/checklist-view.js +434 -0
- package/dist-client/pages/checklist/checklist-view.js.map +1 -0
- package/dist-client/pages/checklist-template/checklist-template-item.d.ts +2 -0
- package/dist-client/pages/checklist-template/checklist-template-item.js +237 -0
- package/dist-client/pages/checklist-template/checklist-template-item.js.map +1 -0
- package/dist-client/pages/{check-item/check-item-list-page.d.ts → checklist-template/checklist-template-list.d.ts} +8 -27
- package/dist-client/pages/checklist-template/checklist-template-list.js +259 -0
- package/dist-client/pages/checklist-template/checklist-template-list.js.map +1 -0
- package/dist-client/pages/checklist-template/checklist-type-management.d.ts +48 -0
- package/dist-client/pages/checklist-template/checklist-type-management.js +229 -0
- package/dist-client/pages/checklist-template/checklist-type-management.js.map +1 -0
- package/dist-client/route.d.ts +1 -1
- package/dist-client/route.js +10 -13
- package/dist-client/route.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/index.d.ts +1 -1
- package/dist-server/index.js +1 -1
- package/dist-server/index.js.map +1 -1
- package/dist-server/service/building-inspection/building-inspection-history.d.ts +17 -0
- package/dist-server/service/building-inspection/building-inspection-history.js +85 -0
- package/dist-server/service/building-inspection/building-inspection-history.js.map +1 -0
- package/dist-server/service/building-inspection/building-inspection-mutation.d.ts +8 -0
- package/dist-server/service/building-inspection/building-inspection-mutation.js +148 -0
- package/dist-server/service/building-inspection/building-inspection-mutation.js.map +1 -0
- package/dist-server/service/building-inspection/building-inspection-query.d.ts +20 -0
- package/dist-server/service/building-inspection/building-inspection-query.js +235 -0
- package/dist-server/service/building-inspection/building-inspection-query.js.map +1 -0
- package/dist-server/service/building-inspection/building-inspection-type.d.ts +43 -0
- package/dist-server/service/building-inspection/building-inspection-type.js +153 -0
- package/dist-server/service/building-inspection/building-inspection-type.js.map +1 -0
- package/dist-server/service/building-inspection/building-inspection.d.ts +26 -0
- package/dist-server/service/building-inspection/building-inspection.js +113 -0
- package/dist-server/service/building-inspection/building-inspection.js.map +1 -0
- package/dist-server/service/building-inspection/event-subscriber.d.ts +7 -0
- package/dist-server/service/building-inspection/event-subscriber.js +21 -0
- package/dist-server/service/building-inspection/event-subscriber.js.map +1 -0
- package/dist-server/service/building-inspection/index.d.ts +10 -0
- package/dist-server/service/building-inspection/index.js +14 -0
- package/dist-server/service/building-inspection/index.js.map +1 -0
- package/dist-server/service/checklist/checklist-history.d.ts +24 -0
- package/dist-server/service/checklist/checklist-history.js +120 -0
- package/dist-server/service/checklist/checklist-history.js.map +1 -0
- package/dist-server/service/checklist/checklist-mutation.d.ts +8 -0
- package/dist-server/service/checklist/checklist-mutation.js +96 -0
- package/dist-server/service/checklist/checklist-mutation.js.map +1 -0
- package/dist-server/service/checklist/checklist-query.d.ts +12 -0
- package/dist-server/service/checklist/checklist-query.js +83 -0
- package/dist-server/service/checklist/checklist-query.js.map +1 -0
- package/dist-server/service/checklist/checklist-type.d.ts +18 -0
- package/dist-server/service/checklist/checklist-type.js +69 -0
- package/dist-server/service/checklist/checklist-type.js.map +1 -0
- package/dist-server/service/checklist/checklist.d.ts +31 -0
- package/dist-server/service/checklist/checklist.js +143 -0
- package/dist-server/service/checklist/checklist.js.map +1 -0
- package/dist-server/service/checklist/event-subscriber.d.ts +7 -0
- package/dist-server/service/checklist/event-subscriber.js +21 -0
- package/dist-server/service/checklist/event-subscriber.js.map +1 -0
- package/dist-server/service/checklist/index.d.ts +8 -0
- package/dist-server/service/checklist/index.js +12 -0
- package/dist-server/service/checklist/index.js.map +1 -0
- package/dist-server/service/checklist-item/checklist-item-mutation.d.ts +2 -0
- package/dist-server/service/checklist-item/checklist-item-mutation.js +13 -0
- package/dist-server/service/checklist-item/checklist-item-mutation.js.map +1 -0
- package/dist-server/service/checklist-item/checklist-item-query.d.ts +10 -0
- package/dist-server/service/checklist-item/checklist-item-query.js +68 -0
- package/dist-server/service/checklist-item/checklist-item-query.js.map +1 -0
- package/dist-server/service/checklist-item/checklist-item-type.d.ts +5 -0
- package/dist-server/service/checklist-item/checklist-item-type.js +21 -0
- package/dist-server/service/checklist-item/checklist-item-type.js.map +1 -0
- package/dist-server/service/checklist-item/checklist-item.d.ts +26 -0
- package/dist-server/service/checklist-item/checklist-item.js +113 -0
- package/dist-server/service/checklist-item/checklist-item.js.map +1 -0
- package/dist-server/service/checklist-item/index.d.ts +5 -0
- package/dist-server/service/checklist-item/index.js +10 -0
- package/dist-server/service/checklist-item/index.js.map +1 -0
- package/dist-server/service/checklist-template/checklist-template-mutation.d.ts +6 -0
- package/dist-server/service/checklist-template/checklist-template-mutation.js +64 -0
- package/dist-server/service/checklist-template/checklist-template-mutation.js.map +1 -0
- package/dist-server/service/checklist-template/checklist-template-query.d.ts +10 -0
- package/dist-server/service/checklist-template/checklist-template-query.js +65 -0
- package/dist-server/service/checklist-template/checklist-template-query.js.map +1 -0
- package/dist-server/service/checklist-template/checklist-template-type.d.ts +10 -0
- package/dist-server/service/checklist-template/checklist-template-type.js +39 -0
- package/dist-server/service/checklist-template/checklist-template-type.js.map +1 -0
- package/dist-server/service/checklist-template/checklist-template.d.ts +17 -0
- package/dist-server/service/checklist-template/checklist-template.js +78 -0
- package/dist-server/service/checklist-template/checklist-template.js.map +1 -0
- package/dist-server/service/checklist-template/index.d.ts +5 -0
- package/dist-server/service/checklist-template/index.js +9 -0
- package/dist-server/service/checklist-template/index.js.map +1 -0
- package/dist-server/service/checklist-template-item/checklist-template-item-mutation.d.ts +7 -0
- package/dist-server/service/checklist-template-item/checklist-template-item-mutation.js +68 -0
- package/dist-server/service/checklist-template-item/checklist-template-item-mutation.js.map +1 -0
- package/dist-server/service/checklist-template-item/checklist-template-item-query.d.ts +10 -0
- package/dist-server/service/checklist-template-item/checklist-template-item-query.js +66 -0
- package/dist-server/service/checklist-template-item/checklist-template-item-query.js.map +1 -0
- package/dist-server/service/checklist-template-item/checklist-template-item-type.d.ts +16 -0
- package/dist-server/service/checklist-template-item/checklist-template-item-type.js +60 -0
- package/dist-server/service/checklist-template-item/checklist-template-item-type.js.map +1 -0
- package/dist-server/service/checklist-template-item/checklist-template-item.d.ts +19 -0
- package/dist-server/service/checklist-template-item/checklist-template-item.js +87 -0
- package/dist-server/service/checklist-template-item/checklist-template-item.js.map +1 -0
- package/dist-server/service/checklist-template-item/index.d.ts +5 -0
- package/dist-server/service/checklist-template-item/index.js +9 -0
- package/dist-server/service/checklist-template-item/index.js.map +1 -0
- package/dist-server/service/checklist-type/checklist-type-mutation.d.ts +6 -0
- package/dist-server/service/checklist-type/checklist-type-mutation.js +64 -0
- package/dist-server/service/checklist-type/checklist-type-mutation.js.map +1 -0
- package/dist-server/service/checklist-type/checklist-type-query.d.ts +10 -0
- package/dist-server/service/checklist-type/checklist-type-query.js +65 -0
- package/dist-server/service/checklist-type/checklist-type-query.js.map +1 -0
- package/dist-server/service/checklist-type/checklist-type-type.d.ts +11 -0
- package/dist-server/service/checklist-type/checklist-type-type.js +43 -0
- package/dist-server/service/checklist-type/checklist-type-type.js.map +1 -0
- package/dist-server/service/checklist-type/checklist-type.d.ts +19 -0
- package/dist-server/service/checklist-type/checklist-type.js +78 -0
- package/dist-server/service/checklist-type/checklist-type.js.map +1 -0
- package/dist-server/service/checklist-type/index.d.ts +5 -0
- package/dist-server/service/checklist-type/index.js +9 -0
- package/dist-server/service/checklist-type/index.js.map +1 -0
- package/dist-server/service/index.d.ts +8 -3
- package/dist-server/service/index.js +25 -5
- package/dist-server/service/index.js.map +1 -1
- package/dist-server/service/issue/issue.d.ts +1 -3
- package/dist-server/service/issue/issue.js +1 -7
- package/dist-server/service/issue/issue.js.map +1 -1
- package/dist-server/service/supervisor/supervisor.d.ts +1 -3
- package/dist-server/service/supervisor/supervisor.js +1 -7
- package/dist-server/service/supervisor/supervisor.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/helps/supervision/checklist-item.md +160 -0
- package/helps/supervision/checklist.md +160 -0
- package/package.json +11 -7
- package/server/index.ts +1 -1
- package/server/service/building-inspection/building-inspection-history.ts +70 -0
- package/server/service/building-inspection/building-inspection-mutation.ts +147 -0
- package/server/service/building-inspection/building-inspection-query.ts +202 -0
- package/server/service/building-inspection/building-inspection-type.ts +101 -0
- package/server/service/building-inspection/building-inspection.ts +106 -0
- package/server/service/building-inspection/event-subscriber.ts +20 -0
- package/server/service/building-inspection/index.ts +11 -0
- package/server/service/checklist/checklist-history.ts +96 -0
- package/server/service/checklist/checklist-mutation.ts +103 -0
- package/server/service/checklist/checklist-query.ts +52 -0
- package/server/service/{check-item/check-item-type.ts → checklist/checklist-type.ts} +6 -18
- package/server/service/checklist/checklist.ts +127 -0
- package/server/service/checklist/event-subscriber.ts +17 -0
- package/server/service/checklist/index.ts +9 -0
- package/server/service/checklist-item/checklist-item-mutation.ts +5 -0
- package/server/service/checklist-item/checklist-item-query.ts +43 -0
- package/server/service/checklist-item/checklist-item-type.ts +12 -0
- package/server/service/checklist-item/checklist-item.ts +100 -0
- package/server/service/checklist-item/index.ts +7 -0
- package/server/service/checklist-template/checklist-template-mutation.ts +66 -0
- package/server/service/checklist-template/checklist-template-query.ts +39 -0
- package/server/service/checklist-template/checklist-template-type.ts +23 -0
- package/server/service/checklist-template/checklist-template.ts +71 -0
- package/server/service/checklist-template/index.ts +6 -0
- package/server/service/checklist-template-item/checklist-template-item-mutation.ts +64 -0
- package/server/service/checklist-template-item/checklist-template-item-query.ts +39 -0
- package/server/service/checklist-template-item/checklist-template-item-type.ts +39 -0
- package/server/service/checklist-template-item/checklist-template-item.ts +67 -0
- package/server/service/checklist-template-item/index.ts +6 -0
- package/server/service/checklist-type/checklist-type-mutation.ts +66 -0
- package/server/service/checklist-type/checklist-type-query.ts +39 -0
- package/server/service/checklist-type/checklist-type-type.ts +26 -0
- package/server/service/checklist-type/checklist-type.ts +64 -0
- package/server/service/checklist-type/index.ts +6 -0
- package/server/service/index.ts +59 -23
- package/server/service/issue/issue.ts +1 -6
- package/server/service/supervisor/supervisor.ts +1 -6
- package/things-factory.config.js +11 -7
- package/client/pages/check-item/check-item-importer.ts +0 -94
- package/client/pages/check-item/check-item-list-page.ts +0 -340
- package/dist-client/pages/check-item/check-item-importer.d.ts +0 -10
- package/dist-client/pages/check-item/check-item-importer.js +0 -101
- package/dist-client/pages/check-item/check-item-importer.js.map +0 -1
- package/dist-client/pages/check-item/check-item-list-page.js +0 -323
- package/dist-client/pages/check-item/check-item-list-page.js.map +0 -1
- package/dist-server/service/check-item/check-item-mutation.d.ts +0 -10
- package/dist-server/service/check-item/check-item-mutation.js +0 -168
- package/dist-server/service/check-item/check-item-mutation.js.map +0 -1
- package/dist-server/service/check-item/check-item-query.d.ts +0 -12
- package/dist-server/service/check-item/check-item-query.js +0 -97
- package/dist-server/service/check-item/check-item-query.js.map +0 -1
- package/dist-server/service/check-item/check-item-type.d.ts +0 -23
- package/dist-server/service/check-item/check-item-type.js +0 -86
- package/dist-server/service/check-item/check-item-type.js.map +0 -1
- package/dist-server/service/check-item/check-item.d.ts +0 -28
- package/dist-server/service/check-item/check-item.js +0 -117
- package/dist-server/service/check-item/check-item.js.map +0 -1
- package/dist-server/service/check-item/index.d.ts +0 -6
- package/dist-server/service/check-item/index.js +0 -10
- package/dist-server/service/check-item/index.js.map +0 -1
- package/server/service/check-item/check-item-mutation.ts +0 -198
- package/server/service/check-item/check-item-query.ts +0 -62
- package/server/service/check-item/check-item.ts +0 -111
- package/server/service/check-item/index.ts +0 -7
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
# ChecklistItem
|
|
2
|
+
|
|
3
|
+
Paragraphs are separated by a blank line.
|
|
4
|
+
|
|
5
|
+
2nd paragraph. _Italic_, **bold**, and `monospace`. Itemized lists
|
|
6
|
+
look like:
|
|
7
|
+
|
|
8
|
+
- this one
|
|
9
|
+
- that one
|
|
10
|
+
- the other one
|
|
11
|
+
|
|
12
|
+
Note that --- not considering the asterisk --- the actual text
|
|
13
|
+
content starts at 4-columns in.
|
|
14
|
+
|
|
15
|
+
> Block quotes are
|
|
16
|
+
> written like so.
|
|
17
|
+
>
|
|
18
|
+
> They can span multiple paragraphs,
|
|
19
|
+
> if you like.
|
|
20
|
+
|
|
21
|
+
Use 3 dashes for an em-dash. Use 2 dashes for ranges (ex., "it's all
|
|
22
|
+
in chapters 12--14"). Three dots ... will be converted to an ellipsis.
|
|
23
|
+
Unicode is supported. ☺
|
|
24
|
+
|
|
25
|
+
## An h2 header
|
|
26
|
+
|
|
27
|
+
Here's a numbered list:
|
|
28
|
+
|
|
29
|
+
1. first item
|
|
30
|
+
2. second item
|
|
31
|
+
3. third item
|
|
32
|
+
|
|
33
|
+
Note again how the actual text starts at 4 columns in (4 characters
|
|
34
|
+
from the left side). Here's a code sample:
|
|
35
|
+
|
|
36
|
+
# Let me re-iterate ...
|
|
37
|
+
|
|
38
|
+
for i in 1 .. 10 { do-something(i) }
|
|
39
|
+
|
|
40
|
+
As you probably guessed, indented 4 spaces. By the way, instead of
|
|
41
|
+
indenting the block, you can use delimited blocks, if you like:
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
define foobar() {
|
|
45
|
+
print "Welcome to flavor country!";
|
|
46
|
+
}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
(which makes copying & pasting easier). You can optionally mark the
|
|
50
|
+
delimited block for Pandoc to syntax highlight it:
|
|
51
|
+
|
|
52
|
+
```python
|
|
53
|
+
import time
|
|
54
|
+
# Quick, count to ten!
|
|
55
|
+
for i in range(10):
|
|
56
|
+
# (but not *too* quick)
|
|
57
|
+
time.sleep(0.5)
|
|
58
|
+
print(i)
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### An h3 header
|
|
62
|
+
|
|
63
|
+
Now a nested list:
|
|
64
|
+
|
|
65
|
+
1. First, get these ingredients:
|
|
66
|
+
|
|
67
|
+
- carrots
|
|
68
|
+
- celery
|
|
69
|
+
- lentils
|
|
70
|
+
|
|
71
|
+
2. Boil some water.
|
|
72
|
+
|
|
73
|
+
3. Dump everything in the pot and follow
|
|
74
|
+
this algorithm:
|
|
75
|
+
|
|
76
|
+
find wooden spoon
|
|
77
|
+
uncover pot
|
|
78
|
+
stir
|
|
79
|
+
cover pot
|
|
80
|
+
balance wooden spoon precariously on pot handle
|
|
81
|
+
wait 10 minutes
|
|
82
|
+
goto first step (or shut off burner when done)
|
|
83
|
+
|
|
84
|
+
Do not bump wooden spoon or it will fall.
|
|
85
|
+
|
|
86
|
+
Notice again how text always lines up on 4-space indents (including
|
|
87
|
+
that last line which continues item 3 above).
|
|
88
|
+
|
|
89
|
+
Here's a link to [a website](http://foo.bar), to a [local
|
|
90
|
+
doc](local-doc.html), and to a [section heading in the current
|
|
91
|
+
doc](#an-h2-header). Here's a footnote [^1].
|
|
92
|
+
|
|
93
|
+
[^1]: Some footnote text.
|
|
94
|
+
|
|
95
|
+
Tables can look like this:
|
|
96
|
+
|
|
97
|
+
Name Size Material Color
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
All Business 9 leather brown
|
|
102
|
+
Roundabout 10 hemp canvas natural
|
|
103
|
+
Cinderella 11 glass transparent
|
|
104
|
+
|
|
105
|
+
Table: Shoes sizes, materials, and colors.
|
|
106
|
+
|
|
107
|
+
(The above is the caption for the table.) Pandoc also supports
|
|
108
|
+
multi-line tables:
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
Keyword Text
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
red Sunsets, apples, and
|
|
117
|
+
other red or reddish
|
|
118
|
+
things.
|
|
119
|
+
|
|
120
|
+
green Leaves, grass, frogs
|
|
121
|
+
and other things it's
|
|
122
|
+
not easy being.
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
A horizontal rule follows.
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
Here's a definition list:
|
|
131
|
+
|
|
132
|
+
apples
|
|
133
|
+
: Good for making applesauce.
|
|
134
|
+
|
|
135
|
+
oranges
|
|
136
|
+
: Citrus!
|
|
137
|
+
|
|
138
|
+
tomatoes
|
|
139
|
+
: There's no "e" in tomatoe.
|
|
140
|
+
|
|
141
|
+
Again, text is indented 4 spaces. (Put a blank line between each
|
|
142
|
+
term and its definition to spread things out more.)
|
|
143
|
+
|
|
144
|
+
Here's a "line block" (note how whitespace is honored):
|
|
145
|
+
|
|
146
|
+
| Line one
|
|
147
|
+
| Line too
|
|
148
|
+
| Line tree
|
|
149
|
+
|
|
150
|
+
and images can be specified like so:
|
|
151
|
+
|
|
152
|
+

|
|
153
|
+
|
|
154
|
+
Inline math equation: $\omega = d\phi / dt$. Display
|
|
155
|
+
math should get its own line like so:
|
|
156
|
+
|
|
157
|
+
$$I = \int \rho R^{2} dV$$
|
|
158
|
+
|
|
159
|
+
And note that you can backslash-escape any punctuation characters
|
|
160
|
+
which you wish to be displayed literally, ex.: \`foo\`, \*bar\*, etc.
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
# Checklist
|
|
2
|
+
|
|
3
|
+
Paragraphs are separated by a blank line.
|
|
4
|
+
|
|
5
|
+
2nd paragraph. _Italic_, **bold**, and `monospace`. Itemized lists
|
|
6
|
+
look like:
|
|
7
|
+
|
|
8
|
+
- this one
|
|
9
|
+
- that one
|
|
10
|
+
- the other one
|
|
11
|
+
|
|
12
|
+
Note that --- not considering the asterisk --- the actual text
|
|
13
|
+
content starts at 4-columns in.
|
|
14
|
+
|
|
15
|
+
> Block quotes are
|
|
16
|
+
> written like so.
|
|
17
|
+
>
|
|
18
|
+
> They can span multiple paragraphs,
|
|
19
|
+
> if you like.
|
|
20
|
+
|
|
21
|
+
Use 3 dashes for an em-dash. Use 2 dashes for ranges (ex., "it's all
|
|
22
|
+
in chapters 12--14"). Three dots ... will be converted to an ellipsis.
|
|
23
|
+
Unicode is supported. ☺
|
|
24
|
+
|
|
25
|
+
## An h2 header
|
|
26
|
+
|
|
27
|
+
Here's a numbered list:
|
|
28
|
+
|
|
29
|
+
1. first item
|
|
30
|
+
2. second item
|
|
31
|
+
3. third item
|
|
32
|
+
|
|
33
|
+
Note again how the actual text starts at 4 columns in (4 characters
|
|
34
|
+
from the left side). Here's a code sample:
|
|
35
|
+
|
|
36
|
+
# Let me re-iterate ...
|
|
37
|
+
|
|
38
|
+
for i in 1 .. 10 { do-something(i) }
|
|
39
|
+
|
|
40
|
+
As you probably guessed, indented 4 spaces. By the way, instead of
|
|
41
|
+
indenting the block, you can use delimited blocks, if you like:
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
define foobar() {
|
|
45
|
+
print "Welcome to flavor country!";
|
|
46
|
+
}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
(which makes copying & pasting easier). You can optionally mark the
|
|
50
|
+
delimited block for Pandoc to syntax highlight it:
|
|
51
|
+
|
|
52
|
+
```python
|
|
53
|
+
import time
|
|
54
|
+
# Quick, count to ten!
|
|
55
|
+
for i in range(10):
|
|
56
|
+
# (but not *too* quick)
|
|
57
|
+
time.sleep(0.5)
|
|
58
|
+
print(i)
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### An h3 header
|
|
62
|
+
|
|
63
|
+
Now a nested list:
|
|
64
|
+
|
|
65
|
+
1. First, get these ingredients:
|
|
66
|
+
|
|
67
|
+
- carrots
|
|
68
|
+
- celery
|
|
69
|
+
- lentils
|
|
70
|
+
|
|
71
|
+
2. Boil some water.
|
|
72
|
+
|
|
73
|
+
3. Dump everything in the pot and follow
|
|
74
|
+
this algorithm:
|
|
75
|
+
|
|
76
|
+
find wooden spoon
|
|
77
|
+
uncover pot
|
|
78
|
+
stir
|
|
79
|
+
cover pot
|
|
80
|
+
balance wooden spoon precariously on pot handle
|
|
81
|
+
wait 10 minutes
|
|
82
|
+
goto first step (or shut off burner when done)
|
|
83
|
+
|
|
84
|
+
Do not bump wooden spoon or it will fall.
|
|
85
|
+
|
|
86
|
+
Notice again how text always lines up on 4-space indents (including
|
|
87
|
+
that last line which continues item 3 above).
|
|
88
|
+
|
|
89
|
+
Here's a link to [a website](http://foo.bar), to a [local
|
|
90
|
+
doc](local-doc.html), and to a [section heading in the current
|
|
91
|
+
doc](#an-h2-header). Here's a footnote [^1].
|
|
92
|
+
|
|
93
|
+
[^1]: Some footnote text.
|
|
94
|
+
|
|
95
|
+
Tables can look like this:
|
|
96
|
+
|
|
97
|
+
Name Size Material Color
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
All Business 9 leather brown
|
|
102
|
+
Roundabout 10 hemp canvas natural
|
|
103
|
+
Cinderella 11 glass transparent
|
|
104
|
+
|
|
105
|
+
Table: Shoes sizes, materials, and colors.
|
|
106
|
+
|
|
107
|
+
(The above is the caption for the table.) Pandoc also supports
|
|
108
|
+
multi-line tables:
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
Keyword Text
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
red Sunsets, apples, and
|
|
117
|
+
other red or reddish
|
|
118
|
+
things.
|
|
119
|
+
|
|
120
|
+
green Leaves, grass, frogs
|
|
121
|
+
and other things it's
|
|
122
|
+
not easy being.
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
A horizontal rule follows.
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
Here's a definition list:
|
|
131
|
+
|
|
132
|
+
apples
|
|
133
|
+
: Good for making applesauce.
|
|
134
|
+
|
|
135
|
+
oranges
|
|
136
|
+
: Citrus!
|
|
137
|
+
|
|
138
|
+
tomatoes
|
|
139
|
+
: There's no "e" in tomatoe.
|
|
140
|
+
|
|
141
|
+
Again, text is indented 4 spaces. (Put a blank line between each
|
|
142
|
+
term and its definition to spread things out more.)
|
|
143
|
+
|
|
144
|
+
Here's a "line block" (note how whitespace is honored):
|
|
145
|
+
|
|
146
|
+
| Line one
|
|
147
|
+
| Line too
|
|
148
|
+
| Line tree
|
|
149
|
+
|
|
150
|
+
and images can be specified like so:
|
|
151
|
+
|
|
152
|
+

|
|
153
|
+
|
|
154
|
+
Inline math equation: $\omega = d\phi / dt$. Display
|
|
155
|
+
math should get its own line like so:
|
|
156
|
+
|
|
157
|
+
$$I = \int \rho R^{2} dV$$
|
|
158
|
+
|
|
159
|
+
And note that you can backslash-escape any punctuation characters
|
|
160
|
+
which you wish to be displayed literally, ex.: \`foo\`, \*bar\*, etc.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dssp/supervision",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.10",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "dist-client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -27,11 +27,15 @@
|
|
|
27
27
|
"migration:create": "node ../../node_modules/typeorm/cli.js migration:create -d ./server/migrations"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@dssp/
|
|
31
|
-
"@
|
|
32
|
-
"@operato/
|
|
33
|
-
"@
|
|
34
|
-
"@
|
|
30
|
+
"@dssp/building-complex": "^0.0.10",
|
|
31
|
+
"@dssp/project": "^0.0.10",
|
|
32
|
+
"@operato/event-view": "^8.0.0-alpha",
|
|
33
|
+
"@operato/graphql": "^8.0.0-alpha",
|
|
34
|
+
"@operato/image-marker": "^8.0.0-alpha",
|
|
35
|
+
"@operato/input": "^8.0.0-alpha",
|
|
36
|
+
"@operato/shell": "^8.0.0-alpha",
|
|
37
|
+
"@things-factory/auth-base": "^8.0.0-alpha",
|
|
38
|
+
"@things-factory/shell": "^8.0.0-alpha"
|
|
35
39
|
},
|
|
36
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "f5e70faf42512bfb57de29892fff63e0bacf5d0e"
|
|
37
41
|
}
|
package/server/index.ts
CHANGED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { Field, ID, ObjectType } from 'type-graphql'
|
|
2
|
+
import { Column, Entity, Index, ManyToOne, PrimaryGeneratedColumn, RelationId } from 'typeorm'
|
|
3
|
+
|
|
4
|
+
import { HistoryActionColumn, HistoryActionType, HistoryEntityInterface, HistoryOriginalIdColumn } from '@operato/typeorm-history'
|
|
5
|
+
import { User } from '@things-factory/auth-base'
|
|
6
|
+
import { config } from '@things-factory/env'
|
|
7
|
+
|
|
8
|
+
import { BuildingInspection, BuildingInspectionStatus } from './building-inspection'
|
|
9
|
+
import { BuildingLevel } from '@dssp/building-complex'
|
|
10
|
+
|
|
11
|
+
const ORMCONFIG = config.get('ormconfig', {})
|
|
12
|
+
const DATABASE_TYPE = ORMCONFIG.type
|
|
13
|
+
|
|
14
|
+
@Entity()
|
|
15
|
+
@Index('ix_buildingInspection_history_0', (buildingInspectionHistory: BuildingInspectionHistory) => [
|
|
16
|
+
buildingInspectionHistory.originalId
|
|
17
|
+
])
|
|
18
|
+
@ObjectType({ description: 'History Entity of BuildingInspection' })
|
|
19
|
+
export class BuildingInspectionHistory implements HistoryEntityInterface<BuildingInspection> {
|
|
20
|
+
@PrimaryGeneratedColumn('uuid')
|
|
21
|
+
@Field(type => ID)
|
|
22
|
+
readonly id: string
|
|
23
|
+
|
|
24
|
+
@Column({ nullable: false, comment: '상태(REQUEST: 요청, PASS: 합격, FAIL: 불합격)' })
|
|
25
|
+
@Field({ nullable: true })
|
|
26
|
+
status?: BuildingInspectionStatus
|
|
27
|
+
|
|
28
|
+
// 층 정보 (1:1 테이블 참조)
|
|
29
|
+
@ManyToOne(type => BuildingLevel)
|
|
30
|
+
@Field({ nullable: true })
|
|
31
|
+
buildingLevel?: BuildingLevel
|
|
32
|
+
|
|
33
|
+
@RelationId((buildingInspection: BuildingInspection) => buildingInspection.buildingLevel)
|
|
34
|
+
buildingLevelId?: string
|
|
35
|
+
|
|
36
|
+
@Column({ nullable: false, comment: '검측 요청일' })
|
|
37
|
+
@Field({ nullable: true })
|
|
38
|
+
requestDate?: Date
|
|
39
|
+
|
|
40
|
+
// 체크리스트 ID (1:1 테이블 참조)
|
|
41
|
+
@Field({ nullable: true })
|
|
42
|
+
@Column({ nullable: true, comment: '체크리스트 ID' })
|
|
43
|
+
checklistId: string
|
|
44
|
+
|
|
45
|
+
@Column({ nullable: true })
|
|
46
|
+
@Field({ nullable: true })
|
|
47
|
+
createdAt?: Date
|
|
48
|
+
|
|
49
|
+
@ManyToOne(type => User, { nullable: true })
|
|
50
|
+
@Field(type => User, { nullable: true })
|
|
51
|
+
creator?: User
|
|
52
|
+
|
|
53
|
+
@RelationId((buildingInspection: BuildingInspection) => buildingInspection.creator)
|
|
54
|
+
creatorId?: string
|
|
55
|
+
|
|
56
|
+
@HistoryOriginalIdColumn()
|
|
57
|
+
public originalId!: string
|
|
58
|
+
|
|
59
|
+
@HistoryActionColumn({
|
|
60
|
+
nullable: false,
|
|
61
|
+
type:
|
|
62
|
+
DATABASE_TYPE == 'postgres' || DATABASE_TYPE == 'mysql' || DATABASE_TYPE == 'mariadb'
|
|
63
|
+
? 'enum'
|
|
64
|
+
: DATABASE_TYPE == 'oracle'
|
|
65
|
+
? 'varchar2'
|
|
66
|
+
: 'smallint',
|
|
67
|
+
enum: HistoryActionType
|
|
68
|
+
})
|
|
69
|
+
public action!: HistoryActionType
|
|
70
|
+
}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import { Resolver, Mutation, Arg, Ctx, Directive } from 'type-graphql'
|
|
2
|
+
import { In } from 'typeorm'
|
|
3
|
+
import { BuildingInspection } from './building-inspection'
|
|
4
|
+
import { NewBuildingInspection, UpdateBuildingInspection } from './building-inspection-type'
|
|
5
|
+
import { BuildingInspectionStatus } from './building-inspection'
|
|
6
|
+
import { Checklist } from '../checklist/checklist'
|
|
7
|
+
import { ChecklistItem } from '../checklist-item/checklist-item'
|
|
8
|
+
import { getRepository } from '@things-factory/shell'
|
|
9
|
+
import { BuildingLevel } from '@dssp/building-complex'
|
|
10
|
+
|
|
11
|
+
@Resolver(BuildingInspection)
|
|
12
|
+
export class BuildingInspectionMutation {
|
|
13
|
+
@Directive('@transaction')
|
|
14
|
+
@Mutation(returns => BuildingInspection, { description: 'To create Building Inspection information' })
|
|
15
|
+
async createBuildingInspection(
|
|
16
|
+
@Arg('patch') patch: NewBuildingInspection,
|
|
17
|
+
@Ctx() context: ResolverContext
|
|
18
|
+
): Promise<BuildingInspection> {
|
|
19
|
+
const { user, tx } = context.state
|
|
20
|
+
const { buildingLevelId, checklist, checklistItem } = patch
|
|
21
|
+
const buildingInspectionRepository = tx.getRepository(BuildingInspection)
|
|
22
|
+
const checklistRepository = tx.getRepository(Checklist)
|
|
23
|
+
const checklistItemRepository = tx.getRepository(ChecklistItem)
|
|
24
|
+
|
|
25
|
+
// 1. 벨리데이션
|
|
26
|
+
if (!buildingLevelId) throw new Error('층 아이디가 없습니다.')
|
|
27
|
+
if (!checklist.name) throw new Error('체크리스트 이름이 없습니다.')
|
|
28
|
+
if (!checklist.constructionType) throw new Error('공종 타입이 없습니다.')
|
|
29
|
+
if (!checklist.constructionDetailType) throw new Error('상세 공종 타입이 없습니다.')
|
|
30
|
+
if (!checklist.location) throw new Error('위치가 없습니다.')
|
|
31
|
+
if (!checklist.inspectionDrawingType) throw new Error('검측 도면 타입이 없습니다.')
|
|
32
|
+
if (checklist.inspectionParts.length === 0) throw new Error('검측 부위가 없습니다.')
|
|
33
|
+
if (checklistItem.length === 0) throw new Error('체크리스트 아이템이 없습니다.')
|
|
34
|
+
|
|
35
|
+
// 2. checklist 저장
|
|
36
|
+
const documentNo = await this.getRecentDocumentNoByBuildingLevelId(buildingLevelId)
|
|
37
|
+
const savedChecklist = await checklistRepository.save({
|
|
38
|
+
...checklist,
|
|
39
|
+
documentNo,
|
|
40
|
+
creator: user,
|
|
41
|
+
updater: user
|
|
42
|
+
})
|
|
43
|
+
|
|
44
|
+
// 3. checklistItem 저장
|
|
45
|
+
const checklistItems = checklistItem.map((item, idx) => ({
|
|
46
|
+
name: item.name,
|
|
47
|
+
mainType: item.mainType,
|
|
48
|
+
detailType: item.detailType,
|
|
49
|
+
inspctionCriteria: item.inspctionCriteria,
|
|
50
|
+
sequence: idx,
|
|
51
|
+
checklist: savedChecklist,
|
|
52
|
+
creator: user,
|
|
53
|
+
updater: user
|
|
54
|
+
}))
|
|
55
|
+
await checklistItemRepository.save(checklistItems)
|
|
56
|
+
|
|
57
|
+
// 4. buildingInspection 저장
|
|
58
|
+
const result = await buildingInspectionRepository.save({
|
|
59
|
+
status: BuildingInspectionStatus.WAIT,
|
|
60
|
+
buildingLevel: { id: buildingLevelId },
|
|
61
|
+
requestDate: new Date(),
|
|
62
|
+
checklist: savedChecklist,
|
|
63
|
+
creator: user,
|
|
64
|
+
updater: user
|
|
65
|
+
})
|
|
66
|
+
|
|
67
|
+
return result
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
@Directive('@transaction')
|
|
71
|
+
@Mutation(returns => BuildingInspection, { description: 'To update Building Inspection information' })
|
|
72
|
+
async updateBuildingInspection(
|
|
73
|
+
@Arg('patch') patch: UpdateBuildingInspection,
|
|
74
|
+
@Ctx() context: ResolverContext
|
|
75
|
+
): Promise<BuildingInspection> {
|
|
76
|
+
const { user, tx } = context.state
|
|
77
|
+
const buildingInspectionRepo = tx.getRepository(BuildingInspection)
|
|
78
|
+
|
|
79
|
+
// 벨리데이션
|
|
80
|
+
if (!patch.id) throw new Error('검측 아이디가 없습니다.')
|
|
81
|
+
|
|
82
|
+
const buildingInspection = await buildingInspectionRepo.findOneBy({ id: patch.id })
|
|
83
|
+
const result = await buildingInspectionRepo.save({
|
|
84
|
+
...buildingInspection,
|
|
85
|
+
...patch,
|
|
86
|
+
updater: user
|
|
87
|
+
})
|
|
88
|
+
|
|
89
|
+
return result
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
@Directive('@transaction')
|
|
93
|
+
@Mutation(returns => Boolean, { description: 'To delete multiple Checklists' })
|
|
94
|
+
async deleteBuildingInspections(
|
|
95
|
+
@Arg('ids', type => [String]) ids: string[],
|
|
96
|
+
@Ctx() context: ResolverContext
|
|
97
|
+
): Promise<boolean> {
|
|
98
|
+
const { domain, tx } = context.state
|
|
99
|
+
const buildingInspectionRepository = tx.getRepository(BuildingInspection)
|
|
100
|
+
const checklistRepository = tx.getRepository(Checklist)
|
|
101
|
+
const checklistItemRepository = tx.getRepository(ChecklistItem)
|
|
102
|
+
|
|
103
|
+
// 검측 데이터 제거
|
|
104
|
+
const buildingInspections = await buildingInspectionRepository.createQueryBuilder('bi').whereInIds(ids).getMany()
|
|
105
|
+
await buildingInspectionRepository.softDelete({
|
|
106
|
+
id: In(ids)
|
|
107
|
+
})
|
|
108
|
+
|
|
109
|
+
// 검측 데이터의 체크 리스트 제거
|
|
110
|
+
const checklistIds = buildingInspections.map(bi => bi.checklistId)
|
|
111
|
+
await checklistRepository.softDelete({
|
|
112
|
+
id: In(checklistIds)
|
|
113
|
+
})
|
|
114
|
+
|
|
115
|
+
// 검측 데이터의 체크 리스트 아이템 제거
|
|
116
|
+
await checklistItemRepository
|
|
117
|
+
.createQueryBuilder()
|
|
118
|
+
.softDelete()
|
|
119
|
+
.where('checklist_id IN (:...checklistIds)', { checklistIds })
|
|
120
|
+
.execute()
|
|
121
|
+
|
|
122
|
+
return true
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
async getRecentDocumentNoByBuildingLevelId(buildingLevelId: string): Promise<string> {
|
|
126
|
+
const buildingLevel = await getRepository(BuildingLevel).findOne({
|
|
127
|
+
where: { id: buildingLevelId },
|
|
128
|
+
relations: ['building']
|
|
129
|
+
})
|
|
130
|
+
|
|
131
|
+
const buildingName = buildingLevel.building.name.match(/\d+/g).join('').padStart(4, '0')
|
|
132
|
+
const floorName = buildingLevel.floor.toString().padStart(3, '0')
|
|
133
|
+
const latestChecklist = await getRepository(Checklist)
|
|
134
|
+
.createQueryBuilder('c')
|
|
135
|
+
.where('c.document_no LIKE :pattern', { pattern: `${buildingName}-${floorName}-%` })
|
|
136
|
+
.orderBy('c.created_at', 'DESC')
|
|
137
|
+
.getOne()
|
|
138
|
+
|
|
139
|
+
let documentNo = '000001'
|
|
140
|
+
if (latestChecklist) {
|
|
141
|
+
const lastNo = latestChecklist.documentNo.split('-')[2]
|
|
142
|
+
documentNo = (Number(lastNo) + 1).toString().padStart(6, '0')
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
return `${buildingName}-${floorName}-${documentNo}`
|
|
146
|
+
}
|
|
147
|
+
}
|