@mixd-id/web-scaffold 0.1.2301231361 → 0.1.2301231363
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/package.json +1 -1
- package/src/utils/helpers.js +10 -2
- package/src/utils/listpage1.js +2 -2
package/package.json
CHANGED
package/src/utils/helpers.js
CHANGED
|
@@ -2,7 +2,6 @@ const md5 = require("md5");
|
|
|
2
2
|
const fs = require("fs");
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
|
|
6
5
|
const ceil = (num, precision = 0) => {
|
|
7
6
|
var p = Math.pow(10, precision)
|
|
8
7
|
var n = (num * p) * (1 + Number.EPSILON)
|
|
@@ -159,6 +158,14 @@ const writeStorage = (path, content, append = false) => {
|
|
|
159
158
|
}
|
|
160
159
|
}
|
|
161
160
|
|
|
161
|
+
const bufferToStream = (buffer) => {
|
|
162
|
+
const { Duplex } = require('stream')
|
|
163
|
+
let stream = new Duplex()
|
|
164
|
+
stream.push(buffer)
|
|
165
|
+
stream.push(null)
|
|
166
|
+
return stream
|
|
167
|
+
}
|
|
168
|
+
|
|
162
169
|
|
|
163
170
|
module.exports = {
|
|
164
171
|
ceil,
|
|
@@ -173,5 +180,6 @@ module.exports = {
|
|
|
173
180
|
sleep,
|
|
174
181
|
strSlug,
|
|
175
182
|
strVars,
|
|
176
|
-
writeStorage
|
|
183
|
+
writeStorage,
|
|
184
|
+
bufferToStream
|
|
177
185
|
}
|
package/src/utils/listpage1.js
CHANGED
|
@@ -217,8 +217,8 @@ let ListPage1 = {
|
|
|
217
217
|
break
|
|
218
218
|
|
|
219
219
|
case 'quarter':
|
|
220
|
-
attributes.push([Sequelize.fn("CONCAT",
|
|
221
|
-
group.push([Sequelize.fn("CONCAT",
|
|
220
|
+
attributes.push([Sequelize.fn("CONCAT", Sequelize.fn('YEAR', Sequelize.col(rowKey)), ' Q', Sequelize.fn('QUARTER', Sequelize.col(rowKey))), "dfDate"])
|
|
221
|
+
group.push([Sequelize.fn("CONCAT", Sequelize.fn('YEAR', Sequelize.col(rowKey)), ' Q', Sequelize.fn('QUARTER', Sequelize.col(rowKey))), "dfDate"])
|
|
222
222
|
summaryColumns.push({ key:"dfDate", label:rowLabel, width:"200px", visible:true, type:"date", format:"MMM YYYY" })
|
|
223
223
|
break
|
|
224
224
|
|