-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdiff.ts
119 lines (116 loc) · 3.11 KB
/
diff.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
import merge from 'ut-function.merge';
export const schema = {
type: 'object',
properties: {
'General Info': {
type: 'object',
title: 'General Information',
properties: {
'First name': {
title: 'Customer First Name',
description: 'First name',
type: 'string'
},
'Last name': {
type: 'string'
},
'National id': {
type: 'string'
},
Gender: {
type: 'string'
},
'User Classification': {
type: 'number'
},
'Business Unit': {
type: 'string'
},
'Business UnitType': {
type: 'boolean'
},
'Lock Status': {
type: 'boolean'
}
}
},
Credentials: {
type: 'object',
title: 'User Credentials',
properties: {
'Set Username': {
type: 'string'
},
'Access Policy Status': {
type: 'number'
},
'Override User Access Policy': {
type: 'string'
}
}
},
'External Credentials': {
type: 'array',
items: {
description: 'External User',
type: 'object',
properties: {
'External System': {
type: 'string'
},
'User Type': {
type: 'string'
},
Username: {
type: 'string'
}
}
}
}
}
};
export const previous = {
'General Info': {
'First name': 'Super',
'Last name': 'Admin',
'National id': null,
Gender: 'm',
'User Classification': 1,
'Phone model': null,
'Computer model': null,
'Business Unit': 'Central office',
'Business Unit Type': true,
'Lock Status': true
},
Addresses: [],
'Phone Numbers': [],
Email: [],
'Assigned Roles': [],
Credentials: {
'Set Username': 'user',
'Access Policy Status': '1',
'Override User Access Policy': 'Policy 2'
},
'External Credentials': [{
'External System': 'cbs',
'User Type': 'login',
Username: 'user'
}, 'test:test'],
Documents: []
};
export const current = merge({}, previous, {
'General Info': {
'Business Unit': null,
Language: 'English',
'Lock Status': false
},
Credentials: {
'Override User Access Policy': 'Policy1'
},
'External Credentials': [{
'External System': null,
'User Type': 'login',
Username: 'login',
Active: true
}, null, 'test:test']
});