@onahhas/hello-dev 1.0.0 → 1.0.1

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.
Files changed (70) hide show
  1. package/README.md +149 -11
  2. package/backend/Controllers/AccountController.cs +100 -0
  3. package/backend/Controllers/ActivityController.cs +44 -0
  4. package/backend/Controllers/AuthController.cs +127 -0
  5. package/backend/Controllers/LookupController.cs +46 -0
  6. package/backend/Controllers/TasksController.cs +652 -0
  7. package/backend/Controllers/UsersController.cs +181 -0
  8. package/backend/Data/AppDbContext.cs +93 -0
  9. package/backend/Data/DbSeeder.cs +122 -0
  10. package/backend/DevTasks.Api.csproj +13 -0
  11. package/backend/Dtos/ActivityDtos.cs +12 -0
  12. package/backend/Dtos/AuthDtos.cs +37 -0
  13. package/backend/Dtos/TaskDtos.cs +104 -0
  14. package/backend/Dtos/UserDtos.cs +29 -0
  15. package/backend/Enums/EditRequestStatus.cs +8 -0
  16. package/backend/Enums/TaskPriority.cs +8 -0
  17. package/backend/Enums/TaskState.cs +9 -0
  18. package/backend/Enums/TaskVisibility.cs +7 -0
  19. package/backend/Enums/UserRole.cs +7 -0
  20. package/backend/Extensions/ClaimsPrincipalExtensions.cs +23 -0
  21. package/backend/Models/ActivityLog.cs +12 -0
  22. package/backend/Models/AppUser.cs +17 -0
  23. package/backend/Models/TaskEditRequest.cs +31 -0
  24. package/backend/Models/TaskItem.cs +25 -0
  25. package/backend/Program.cs +138 -0
  26. package/backend/Properties/launchSettings.json +13 -0
  27. package/backend/Services/ActivityService.cs +28 -0
  28. package/backend/Services/PasswordHasher.cs +58 -0
  29. package/backend/Services/TokenService.cs +49 -0
  30. package/backend/appsettings.Development.json +10 -0
  31. package/backend/appsettings.json +24 -0
  32. package/frontend/index.html +12 -0
  33. package/frontend/package-lock.json +1769 -0
  34. package/frontend/package.json +23 -0
  35. package/frontend/src/App.tsx +40 -0
  36. package/frontend/src/api/http.ts +75 -0
  37. package/frontend/src/auth/AuthContext.tsx +101 -0
  38. package/frontend/src/components/EditRequestModal.tsx +139 -0
  39. package/frontend/src/components/EditRequestsPanel.tsx +94 -0
  40. package/frontend/src/components/Layout.tsx +76 -0
  41. package/frontend/src/components/PageHeader.tsx +21 -0
  42. package/frontend/src/components/ProtectedRoute.tsx +14 -0
  43. package/frontend/src/components/StatCard.tsx +15 -0
  44. package/frontend/src/components/TaskCard.tsx +83 -0
  45. package/frontend/src/components/TaskDetailsModal.tsx +45 -0
  46. package/frontend/src/components/TaskFilters.tsx +67 -0
  47. package/frontend/src/components/TaskModal.tsx +159 -0
  48. package/frontend/src/components/TaskTable.tsx +68 -0
  49. package/frontend/src/components/UserModal.tsx +124 -0
  50. package/frontend/src/main.tsx +19 -0
  51. package/frontend/src/pages/ActivityPage.tsx +37 -0
  52. package/frontend/src/pages/BoardPage.tsx +75 -0
  53. package/frontend/src/pages/CalendarPage.tsx +101 -0
  54. package/frontend/src/pages/DashboardPage.tsx +131 -0
  55. package/frontend/src/pages/LoginPage.tsx +69 -0
  56. package/frontend/src/pages/ProfilePage.tsx +111 -0
  57. package/frontend/src/pages/PublicTasksPage.tsx +99 -0
  58. package/frontend/src/pages/RegisterPage.tsx +80 -0
  59. package/frontend/src/pages/TasksPage.tsx +135 -0
  60. package/frontend/src/pages/UsersPage.tsx +86 -0
  61. package/frontend/src/styles.css +596 -0
  62. package/frontend/src/theme.tsx +49 -0
  63. package/frontend/src/types.ts +78 -0
  64. package/frontend/src/utils/date.ts +30 -0
  65. package/frontend/src/utils/labels.ts +3 -0
  66. package/frontend/src/vite-env.d.ts +1 -0
  67. package/frontend/tsconfig.json +21 -0
  68. package/frontend/vite.config.ts +15 -0
  69. package/package.json +22 -9
  70. package/index.js +0 -7
@@ -0,0 +1,30 @@
1
+ export function formatDate(value: string | null | undefined): string {
2
+ if (!value) return 'No date';
3
+ return new Intl.DateTimeFormat(undefined, {
4
+ year: 'numeric',
5
+ month: 'short',
6
+ day: '2-digit'
7
+ }).format(new Date(value));
8
+ }
9
+
10
+ export function formatDateTime(value: string): string {
11
+ return new Intl.DateTimeFormat(undefined, {
12
+ year: 'numeric',
13
+ month: 'short',
14
+ day: '2-digit',
15
+ hour: '2-digit',
16
+ minute: '2-digit'
17
+ }).format(new Date(value));
18
+ }
19
+
20
+ export function toDateInputValue(value: string | null | undefined): string {
21
+ if (!value) return '';
22
+ const date = new Date(value);
23
+ if (Number.isNaN(date.getTime())) return '';
24
+ return date.toISOString().slice(0, 10);
25
+ }
26
+
27
+ export function fromDateInputValue(value: string): string | null {
28
+ if (!value) return null;
29
+ return new Date(`${value}T12:00:00`).toISOString();
30
+ }
@@ -0,0 +1,3 @@
1
+ export function label(value: string): string {
2
+ return value.replace(/([a-z])([A-Z])/g, '$1 $2');
3
+ }
@@ -0,0 +1 @@
1
+ /// <reference types="vite/client" />
@@ -0,0 +1,21 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2020",
4
+ "useDefineForClassFields": true,
5
+ "lib": ["DOM", "DOM.Iterable", "ES2020"],
6
+ "allowJs": false,
7
+ "skipLibCheck": true,
8
+ "esModuleInterop": true,
9
+ "allowSyntheticDefaultImports": true,
10
+ "strict": true,
11
+ "forceConsistentCasingInFileNames": true,
12
+ "module": "ESNext",
13
+ "moduleResolution": "Node",
14
+ "resolveJsonModule": true,
15
+ "isolatedModules": true,
16
+ "noEmit": true,
17
+ "jsx": "react-jsx"
18
+ },
19
+ "include": ["src"],
20
+ "references": []
21
+ }
@@ -0,0 +1,15 @@
1
+ import { defineConfig } from 'vite';
2
+ import react from '@vitejs/plugin-react';
3
+
4
+ export default defineConfig({
5
+ plugins: [react()],
6
+ server: {
7
+ port: 5173,
8
+ proxy: {
9
+ '/api': {
10
+ target: 'http://localhost:5058',
11
+ changeOrigin: true
12
+ }
13
+ }
14
+ }
15
+ });
package/package.json CHANGED
@@ -1,15 +1,28 @@
1
1
  {
2
2
  "name": "@onahhas/hello-dev",
3
- "version": "1.0.0",
4
- "description": "A simple package that greets the user by name.",
5
- "main": "index.js",
3
+ "version": "1.0.1",
4
+ "description": "DevTasks full-stack task management website source package.",
5
+ "private": false,
6
+ "license": "MIT",
7
+ "author": "Omar Nahhas",
6
8
  "type": "commonjs",
9
+ "files": [
10
+ "backend",
11
+ "frontend",
12
+ "README.md"
13
+ ],
7
14
  "keywords": [
8
- "hello",
9
- "greeting",
10
- "sample",
11
- "npm"
15
+ "task-management",
16
+ "react",
17
+ "typescript",
18
+ "aspnetcore",
19
+ "dotnet",
20
+ "devtasks"
12
21
  ],
13
- "author": "Omar Nahhas",
14
- "license": "MIT"
22
+ "scripts": {
23
+ "frontend:install": "cd frontend && npm install",
24
+ "frontend:dev": "cd frontend && npm run dev",
25
+ "backend:restore": "cd backend && dotnet restore",
26
+ "backend:run": "cd backend && dotnet run"
27
+ }
15
28
  }
package/index.js DELETED
@@ -1,7 +0,0 @@
1
- function hello(name = 'developer') {
2
- return `Hello, ${name}!`;
3
- }
4
-
5
- module.exports = {
6
- hello
7
- };