@cyco77/pptb-usersettings-utiliy 0.1.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.
- package/LICENSE +674 -0
- package/README.md +246 -0
- package/dist/assets/index-Dp1t9EPU.js +28 -0
- package/dist/assets/usersettings-utility_small-cwtNWFYQ.png +0 -0
- package/dist/index.html +14 -0
- package/index.html +12 -0
- package/npm-shrinkwrap.json +3552 -0
- package/package.json +37 -0
package/README.md
ADDED
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
# User Settings Utility
|
|
2
|
+
|
|
3
|
+
<p align="center">
|
|
4
|
+
<img src="icon/usersettings-utility_small.png" alt="User Settings Utility Logo" width="314" height="150">
|
|
5
|
+
</p>
|
|
6
|
+
|
|
7
|
+
<p align="center">
|
|
8
|
+
A Power Platform Tool Box (PPTB) plugin for viewing and updating Dynamics 365 / Dataverse user settings. This tool provides an intuitive interface to manage user settings across multiple users simultaneously.
|
|
9
|
+
</p>
|
|
10
|
+
|
|
11
|
+
## Screenshots
|
|
12
|
+
|
|
13
|
+
### Dark Theme
|
|
14
|
+
|
|
15
|
+

|
|
16
|
+
|
|
17
|
+
## Features
|
|
18
|
+
|
|
19
|
+
### Core Capabilities
|
|
20
|
+
|
|
21
|
+
- 👥 **User Browser** - View all active system users in your Dataverse environment
|
|
22
|
+
- ⚙️ **User Settings Management** - View and edit detailed user settings
|
|
23
|
+
- 🔄 **Bulk Updates** - Update settings for multiple users at once
|
|
24
|
+
- 🔍 **Advanced Filtering** - Filter users by name, email, or business unit
|
|
25
|
+
- 📊 **Sortable Data Grid** - Sort users by any column with multi-select support
|
|
26
|
+
- 💾 **Save Changes** - Track and save pending changes with visual feedback
|
|
27
|
+
- 🎨 **Theme Support** - Automatic light/dark theme switching based on PPTB settings
|
|
28
|
+
|
|
29
|
+
### Editable User Settings
|
|
30
|
+
|
|
31
|
+
The tool supports viewing and editing various user settings including:
|
|
32
|
+
|
|
33
|
+
- **Localization**: UI Language, Help Language, Currency, Timezone, Format (locale)
|
|
34
|
+
- **Navigation**: Default Homepage Area, Subarea, and Dashboard
|
|
35
|
+
- **Display**: Paging Limit, Calendar Type, Default Calendar View, Week Numbers
|
|
36
|
+
- **Regional Settings**: Date/Time formats, Number formats, Currency formats
|
|
37
|
+
- **Email & Sync**: Email filtering, Sync intervals, Contact sync settings
|
|
38
|
+
- **Advanced**: Various personalization and feature toggles
|
|
39
|
+
|
|
40
|
+
### Technical Stack
|
|
41
|
+
|
|
42
|
+
- ✅ React 18 with TypeScript
|
|
43
|
+
- ✅ Fluent UI React Components for consistent Microsoft design
|
|
44
|
+
- ✅ Vite for fast development and optimized builds
|
|
45
|
+
- ✅ Power Platform Toolbox API integration
|
|
46
|
+
- ✅ Dataverse API for querying and updating user settings
|
|
47
|
+
|
|
48
|
+
## Structure
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
pptb-user-settings-utility/
|
|
52
|
+
├── src/
|
|
53
|
+
│ ├── components/
|
|
54
|
+
│ │ ├── Filter.tsx # Business unit and text filtering
|
|
55
|
+
│ │ ├── Overview.tsx # Main container component
|
|
56
|
+
│ │ ├── SystemuserDetails.tsx # User details and settings editor
|
|
57
|
+
│ │ ├── SystemuserGrid.tsx # Data grid for system users
|
|
58
|
+
│ │ └── usersettings/ # User settings components
|
|
59
|
+
│ │ ├── FieldInfoTooltip.tsx # Tooltip for field info
|
|
60
|
+
│ │ ├── FieldRenderers.tsx # Field rendering utilities
|
|
61
|
+
│ │ ├── SettingsSection.tsx # Settings section component
|
|
62
|
+
│ │ ├── UsersettingsTab.tsx # Main settings tab
|
|
63
|
+
│ │ └── ... # Additional utilities
|
|
64
|
+
│ ├── hooks/
|
|
65
|
+
│ │ └── useToolboxAPI.ts # PPTB API hooks
|
|
66
|
+
│ ├── mappers/
|
|
67
|
+
│ │ ├── businessunitMapper.ts # Business unit data mapping
|
|
68
|
+
│ │ ├── formatMapper.ts # Format/locale data mapping
|
|
69
|
+
│ │ ├── languageMapper.ts # Language data mapping
|
|
70
|
+
│ │ ├── sitemapMapper.ts # Sitemap data mapping
|
|
71
|
+
│ │ ├── systemuserMapper.ts # System user data mapping
|
|
72
|
+
│ │ ├── timezoneMapper.ts # Timezone data mapping
|
|
73
|
+
│ │ └── usersettingsMapper.ts # User settings data mapping
|
|
74
|
+
│ ├── services/
|
|
75
|
+
│ │ └── dataverseService.ts # Dataverse API queries
|
|
76
|
+
│ ├── types/
|
|
77
|
+
│ │ ├── businessunit.ts # Business unit type definitions
|
|
78
|
+
│ │ ├── currency.ts # Currency type definitions
|
|
79
|
+
│ │ ├── dashboard.ts # Dashboard type definitions
|
|
80
|
+
│ │ ├── format.ts # Format type definitions
|
|
81
|
+
│ │ ├── language.ts # Language type definitions
|
|
82
|
+
│ │ ├── pendingChanges.ts # Pending changes type definitions
|
|
83
|
+
│ │ ├── sitemap.ts # Sitemap type definitions
|
|
84
|
+
│ │ ├── systemuser.ts # System user type definitions
|
|
85
|
+
│ │ ├── timezone.ts # Timezone type definitions
|
|
86
|
+
│ │ └── usersettings.ts # User settings type definitions
|
|
87
|
+
│ ├── App.tsx # Main application component
|
|
88
|
+
│ ├── main.tsx # Entry point
|
|
89
|
+
│ └── index.css # Global styling
|
|
90
|
+
├── dist/ # Build output
|
|
91
|
+
├── icon/ # Tool icons
|
|
92
|
+
├── index.html
|
|
93
|
+
├── package.json
|
|
94
|
+
├── tsconfig.json
|
|
95
|
+
└── vite.config.ts
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## Installation
|
|
99
|
+
|
|
100
|
+
### Prerequisites
|
|
101
|
+
|
|
102
|
+
- Node.js >= 18.0.0
|
|
103
|
+
- npm or yarn
|
|
104
|
+
- Power Platform Toolbox installed
|
|
105
|
+
|
|
106
|
+
### Setup
|
|
107
|
+
|
|
108
|
+
1. Clone the repository:
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
git clone <repository-url>
|
|
112
|
+
cd pptb-user-settings-utility
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
2. Install dependencies:
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
npm install
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## Development
|
|
122
|
+
|
|
123
|
+
### Development Server
|
|
124
|
+
|
|
125
|
+
Start development server with HMR:
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
npm run dev
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
The tool will be available at \`http://localhost:5173\`
|
|
132
|
+
|
|
133
|
+
### Watch Mode
|
|
134
|
+
|
|
135
|
+
Build the tool in watch mode for continuous updates:
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
npm run watch
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
### Production Build
|
|
142
|
+
|
|
143
|
+
Build the optimized production version:
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
npm run build
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
The output will be in the \`dist/\` directory.
|
|
150
|
+
|
|
151
|
+
### Preview Build
|
|
152
|
+
|
|
153
|
+
Preview the production build locally:
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
npm run preview
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
## Usage
|
|
160
|
+
|
|
161
|
+
### In Power Platform Toolbox
|
|
162
|
+
|
|
163
|
+
1. Build the tool:
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
npm run build
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
2. Package the tool (creates npm-shrinkwrap.json):
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
npm run finalize-package
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
3. Install in Power Platform Toolbox using the PPTB interface
|
|
176
|
+
|
|
177
|
+
4. Connect to a Dataverse environment
|
|
178
|
+
|
|
179
|
+
5. Launch the tool to view and manage user settings
|
|
180
|
+
|
|
181
|
+
### User Interface
|
|
182
|
+
|
|
183
|
+
#### Filter Section
|
|
184
|
+
|
|
185
|
+
- **Business Unit Dropdown**: Filter users by their business unit
|
|
186
|
+
- **Search Box**: Real-time search across user name, email, and business unit
|
|
187
|
+
|
|
188
|
+
#### User Grid
|
|
189
|
+
|
|
190
|
+
- Click column headers to sort
|
|
191
|
+
- Use checkboxes to select one or multiple users
|
|
192
|
+
- Columns: Full Name, Email, Business Unit, System User ID
|
|
193
|
+
|
|
194
|
+
#### Settings Panel
|
|
195
|
+
|
|
196
|
+
- View and edit settings for selected user(s)
|
|
197
|
+
- When multiple users are selected:
|
|
198
|
+
- Fields with matching values show the common value
|
|
199
|
+
- Fields with different values show "No change" placeholder
|
|
200
|
+
- Pending changes are tracked and displayed
|
|
201
|
+
- Click "Save" to apply changes to all selected users
|
|
202
|
+
|
|
203
|
+
## API Usage
|
|
204
|
+
|
|
205
|
+
The tool uses the Power Platform Toolbox and Dataverse APIs:
|
|
206
|
+
|
|
207
|
+
### Connection Management
|
|
208
|
+
|
|
209
|
+
```typescript
|
|
210
|
+
// Get current connection
|
|
211
|
+
const connection = await window.toolboxAPI.getConnection();
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
### Data Queries
|
|
215
|
+
|
|
216
|
+
```typescript
|
|
217
|
+
// Query system users
|
|
218
|
+
const users = await window.dataverseAPI.queryData(
|
|
219
|
+
"systemusers?$select=systemuserid,fullname,internalemailaddress"
|
|
220
|
+
);
|
|
221
|
+
|
|
222
|
+
// Query user settings
|
|
223
|
+
const settings = await window.dataverseAPI.queryData(
|
|
224
|
+
\`usersettingscollection?$filter=systemuserid eq '\${userId}'\`
|
|
225
|
+
);
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
### Notifications
|
|
229
|
+
|
|
230
|
+
```typescript
|
|
231
|
+
// Show notification
|
|
232
|
+
await window.toolboxAPI.utils.showNotification({
|
|
233
|
+
title: "Success",
|
|
234
|
+
body: "Settings updated successfully",
|
|
235
|
+
type: "success",
|
|
236
|
+
duration: 3000,
|
|
237
|
+
});
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
## License
|
|
241
|
+
|
|
242
|
+
MIT License - see [LICENSE](LICENSE) file for details.
|
|
243
|
+
|
|
244
|
+
## Author
|
|
245
|
+
|
|
246
|
+
Lars Hildebrandt
|