identity-admin 1.11.0 → 1.12.0

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.
@@ -251,7 +251,7 @@ let DashboardController = DashboardController_1 = class DashboardController {
251
251
  return ResponseUtils_1.default.unprocessable(res, 'Invalid Data', record.getErrors());
252
252
  }
253
253
  if (crudOperations && crudOperations.create && crudOperations.create.after) {
254
- record = yield crudOperations.create.after(req, record, currentUser);
254
+ record = yield crudOperations.create.after(req, record, currentUser, recordParams);
255
255
  }
256
256
  return ResponseUtils_1.default.created(res, {
257
257
  record
@@ -33,6 +33,9 @@ class SchemaGenerator {
33
33
  model = modelAndPopulatedString[0];
34
34
  populatedString = modelAndPopulatedString[1];
35
35
  }
36
+ if (fieldType === helpers_1.FieldTypes.DATE) {
37
+ model[field].withTime = model[field].withTime ? model[field].withTime : false;
38
+ }
36
39
  else if (fieldType === helpers_1.FieldTypes.ARRAY) {
37
40
  model[field].required = schema[field].caster.isRequired;
38
41
  if (schema[field].schema) {
@@ -62,7 +62,7 @@ interface ICrudOperations {
62
62
  * After handler that gives you the access to the saved document.
63
63
  * @returns the saved document
64
64
  */
65
- after?: (req: IRequest, document: Document, currentUser: Document) => Promise<Document>;
65
+ after?: (req: IRequest, document: Document, currentUser: Document, params: any) => Promise<Document>;
66
66
  };
67
67
  update?: {
68
68
  /**
@@ -202,6 +202,11 @@ export interface IFieldValue {
202
202
  * @default image
203
203
  */
204
204
  fileType?: FileTypes;
205
+ /**
206
+ * Specify if the date is shown with time or not. Only used if the field type is Date
207
+ * @default false
208
+ */
209
+ withTime?: boolean;
205
210
  }
206
211
  export interface IVirtualValue {
207
212
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "identity-admin",
3
- "version": "1.11.0",
3
+ "version": "1.12.0",
4
4
  "description": "",
5
5
  "main": "lib/Dashboard.js",
6
6
  "types": "lib/Dashbord.d.ts",