Skip to content

Commit 1606ee0

Browse files
authored
Merge pull request #307 from Resgrid/develop
RE1-T105 Added Languages to missing pages, gdpr support for export, e…
2 parents 9b70aa3 + 3dfa19c commit 1606ee0

230 files changed

Lines changed: 21394 additions & 1705 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude/settings.local.json

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
{
2+
"permissions": {
3+
"allow": [
4+
"mcp__dual-graph__graph_scan",
5+
"mcp__dual-graph__graph_continue",
6+
"Bash(find G:ResgridResgridCoreResgrid.ModelBilling -type f -name *.cs)",
7+
"Bash(python3:*)",
8+
"Bash(xargs grep:*)",
9+
"Bash(grep -E \"\\\\.cs$|Program\")",
10+
"Bash(grep -l \"DepartmentMembers\\\\|DepartmentMember\" \"G:\\\\Resgrid\\\\Resgrid/Repositories/Resgrid.Repositories.DataRepository/\"*.cs)",
11+
"Bash(find /g/Resgrid/Resgrid/Repositories/Resgrid.Repositories.DataRepository/Servers -name *.cs)",
12+
"Bash(find G:/Resgrid/Resgrid -newer G:/Resgrid/Resgrid/CLAUDE.md -name *.cs -not -path */obj/* -not -path */.git/*)",
13+
"Bash(dotnet build:*)"
14+
]
15+
},
16+
"hooks": {
17+
"SessionStart": [
18+
{
19+
"matcher": "",
20+
"hooks": [
21+
{
22+
"type": "command",
23+
"command": "powershell -NoProfile -File \"G:/Resgrid/Resgrid/.dual-graph/prime.ps1\""
24+
}
25+
]
26+
}
27+
],
28+
"Stop": [
29+
{
30+
"matcher": "",
31+
"hooks": [
32+
{
33+
"type": "command",
34+
"command": "powershell -NoProfile -File \"G:/Resgrid/Resgrid/.dual-graph/stop_hook.ps1\""
35+
}
36+
]
37+
}
38+
],
39+
"PreCompact": [
40+
{
41+
"matcher": "",
42+
"hooks": [
43+
{
44+
"type": "command",
45+
"command": "powershell -NoProfile -File \"G:/Resgrid/Resgrid/.dual-graph/prime.ps1\""
46+
}
47+
]
48+
}
49+
]
50+
}
51+
}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,3 +272,4 @@ Web/Resgrid.WebCore/wwwroot/js/ng/*
272272
Web/Resgrid.WebCore/wwwroot/lib/*
273273
/Web/Resgrid.Web/wwwroot/lib
274274
.dual-graph/
275+
.claude/settings.local.json

CLAUDE.md

Lines changed: 0 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -92,98 +92,3 @@ When the user signals they are done (e.g. "bye", "done", "wrap up", "end session
9292
- **Next Steps**: bullet list, max 3 items
9393

9494
Keep `CONTEXT.md` under 20 lines total. Do NOT summarize the full conversation — only what's needed to resume next session.
95-
96-
---
97-
98-
# Coding Standards
99-
100-
## General
101-
102-
Write C# code that maximises readability, maintainability, and correctness while minimising complexity and coupling. Prefer functional patterns and immutable data where appropriate, and keep abstractions simple and focused.
103-
104-
- Write clear, self-documenting code
105-
- Keep abstractions simple and focused
106-
- Minimise dependencies and coupling
107-
- Use modern C# features appropriately
108-
- Use the repository pattern with Dapper at the repository layer for SQL Server and PostgreSQL database communication
109-
110-
## Code Organisation
111-
112-
**Use meaningful names — no unclear abbreviations:**
113-
```csharp
114-
// Good
115-
public async Task<Result<Order>> ProcessOrderAsync(OrderRequest request, CancellationToken cancellationToken)
116-
117-
// Avoid
118-
public async Task<Result<T>> ProcAsync<T>(ReqDto r, CancellationToken ct)
119-
```
120-
121-
**Separate state from behaviour:**
122-
```csharp
123-
// Good
124-
public sealed record Order(OrderId Id, List<OrderLine> Lines);
125-
126-
public static class OrderOperations
127-
{
128-
public static decimal CalculateTotal(Order order) =>
129-
order.Lines.Sum(line => line.Price * line.Quantity);
130-
}
131-
```
132-
133-
**Prefer pure methods — avoid hidden side effects:**
134-
```csharp
135-
// Good
136-
public static decimal CalculateTotalPrice(IEnumerable<OrderLine> lines, decimal taxRate) =>
137-
lines.Sum(line => line.Price * line.Quantity) * (1 + taxRate);
138-
139-
// Avoid
140-
public void CalculateAndUpdateTotalPrice()
141-
{
142-
this.Total = this.Lines.Sum(l => l.Price * l.Quantity);
143-
this.UpdateDatabase();
144-
}
145-
```
146-
147-
**Use extension methods for domain-specific operations:**
148-
```csharp
149-
public static class OrderExtensions
150-
{
151-
public static bool CanBeFulfilled(this Order order, Inventory inventory) =>
152-
order.Lines.All(line => inventory.HasStock(line.ProductId, line.Quantity));
153-
}
154-
```
155-
156-
**Design for testability — avoid hidden dependencies:**
157-
```csharp
158-
// Good: pure, easily testable
159-
public static decimal CalculateDiscount(decimal price, int quantity, CustomerTier tier) => ...
160-
161-
// Avoid: hidden service calls make this impossible to unit test
162-
public decimal CalculateDiscount()
163-
{
164-
var user = _userService.GetCurrentUser();
165-
var settings = _configService.GetSettings();
166-
...
167-
}
168-
```
169-
170-
## Dependency Management
171-
172-
**Minimise constructor injection — too many dependencies signal a design problem:**
173-
```csharp
174-
// Good
175-
public sealed class OrderProcessor(IOrderRepository repository) { }
176-
177-
// Avoid
178-
public class OrderProcessor(
179-
IOrderRepository repository,
180-
ILogger logger,
181-
IEmailService emailService,
182-
IMetrics metrics,
183-
IValidator validator) { }
184-
```
185-
186-
**Prefer composition via interfaces:**
187-
```csharp
188-
public sealed class EnhancedLogger(ILogger baseLogger, IMetrics metrics) : ILogger { }
189-
```

Core/Resgrid.Config/PaymentProviderConfig.cs

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,17 @@ public static class PaymentProviderConfig
2525
public static string TenEntityPackage = "6f4c5f8b-584d-4291-8a7d-29bf97ae6aa9";
2626
public static string TenEntityPackageTest = "6f4c5f8b-584d-4291-8a7d-29bf97ae6aa9";
2727

28+
public static string PaddleProductionApiKey = "";
29+
public static string PaddleTestApiKey = "";
30+
public static string PaddleProductionBillingWebhookSigningKey = "";
31+
public static string PaddleTestBillingWebhookSigningKey = "";
32+
public static string PaddlePTT10UserAddonPackage = "";
33+
public static string PaddlePTT10UserAddonPackageTest = "";
34+
public static string PaddleProductionEnvironment = "production";
35+
public static string PaddleTestEnvironment = "sandbox";
36+
public static string PaddleProductionClientToken = "";
37+
public static string PaddleTestClientToken = "";
38+
2839
public static string GetStripeClientKey()
2940
{
3041
if (IsTestMode)
@@ -72,5 +83,45 @@ public static string GetTenEntityPackageId()
7283
else
7384
return TenEntityPackage;
7485
}
86+
87+
public static string GetPaddleApiKey()
88+
{
89+
if (IsTestMode)
90+
return PaddleTestApiKey;
91+
else
92+
return PaddleProductionApiKey;
93+
}
94+
95+
public static string GetPaddleBillingWebhookSigningKey()
96+
{
97+
if (IsTestMode)
98+
return PaddleTestBillingWebhookSigningKey;
99+
else
100+
return PaddleProductionBillingWebhookSigningKey;
101+
}
102+
103+
public static string GetPaddlePTT10UserAddonPackageId()
104+
{
105+
if (IsTestMode)
106+
return PaddlePTT10UserAddonPackageTest;
107+
else
108+
return PaddlePTT10UserAddonPackage;
109+
}
110+
111+
public static string GetPaddleEnvironment()
112+
{
113+
if (IsTestMode)
114+
return PaddleTestEnvironment;
115+
else
116+
return PaddleProductionEnvironment;
117+
}
118+
119+
public static string GetPaddleClientToken()
120+
{
121+
if (IsTestMode)
122+
return PaddleTestClientToken;
123+
else
124+
return PaddleProductionClientToken;
125+
}
75126
}
76127
}

Core/Resgrid.Config/SystemBehaviorConfig.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ public static class SystemBehaviorConfig
3535
/// </summary>
3636
public static string BillingApiBaseUrl = "";
3737

38+
/// <summary>
39+
/// When true, new accounts must select and pay for a plan during registration.
40+
/// Free tier signups are not allowed. Intended for EU-Central deployments.
41+
/// </summary>
42+
public static bool RequirePlanSelectionDuringSignup = false;
43+
3844
/// <summary>
3945
/// This will prevent the system from sending any outbound messages, for example
4046
/// email, push, text or call. Allows for testing the system without risk of sending
Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,10 @@
1-
namespace Resgrid.Config
1+
namespace Resgrid.Config
22
{
33
public static class TelemetryConfig
44
{
55
public static string Exporter = "";
66

7-
public static TelemetryExporters ExporterType = TelemetryExporters.None;
8-
public static string PostHogUrl = "";
9-
public static string PostHogApiKey = "";
10-
11-
public static string AptabaseUrl = "";
12-
public static string AptabaseWebApiKey = "";
13-
public static string AptabaseServicesApiKey = "";
14-
public static string AptabaseResponderApiKey = "";
15-
public static string AptabaseUnitApiKey = "";
16-
public static string AptabaseBigBoardApiKey = "";
17-
public static string AptabaseDispatchApiKey = "";
18-
197
public static string CountlyUrl = "";
208
public static string CountlyWebKey = "";
21-
22-
public static string GetAnalyticsKey()
23-
{
24-
if (ExporterType == TelemetryExporters.PostHog)
25-
return PostHogApiKey;
26-
else if (ExporterType == TelemetryExporters.Aptabase)
27-
return AptabaseWebApiKey;
28-
return string.Empty;
29-
}
30-
}
31-
32-
public enum TelemetryExporters
33-
{
34-
None = 0,
35-
PostHog = 1,
36-
Aptabase = 2
379
}
3810
}

Core/Resgrid.Localization/Account/Login.ar.resx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,4 +198,10 @@
198198
<data name="Username" xml:space="preserve">
199199
<value>اسم المستخدم</value>
200200
</data>
201+
<data name="DiscountCode" xml:space="preserve">
202+
<value>Discount Code</value>
203+
</data>
204+
<data name="AffiliateCode" xml:space="preserve">
205+
<value>Affiliate Code</value>
206+
</data>
201207
</root>

Core/Resgrid.Localization/Account/Login.de.resx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,4 +203,10 @@
203203
<data name="Username" xml:space="preserve">
204204
<value>Benutzername</value>
205205
</data>
206+
<data name="DiscountCode" xml:space="preserve">
207+
<value>Discount Code</value>
208+
</data>
209+
<data name="AffiliateCode" xml:space="preserve">
210+
<value>Affiliate Code</value>
211+
</data>
206212
</root>

Core/Resgrid.Localization/Account/Login.en.resx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,4 +252,10 @@
252252
<data name="Username" xml:space="preserve">
253253
<value>Username</value>
254254
</data>
255+
<data name="DiscountCode" xml:space="preserve">
256+
<value>Discount Code</value>
257+
</data>
258+
<data name="AffiliateCode" xml:space="preserve">
259+
<value>Affiliate Code</value>
260+
</data>
255261
</root>

Core/Resgrid.Localization/Account/Login.es.resx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,4 +252,10 @@
252252
<data name="Username" xml:space="preserve">
253253
<value>Nombre de usuario</value>
254254
</data>
255+
<data name="DiscountCode" xml:space="preserve">
256+
<value>Discount Code</value>
257+
</data>
258+
<data name="AffiliateCode" xml:space="preserve">
259+
<value>Affiliate Code</value>
260+
</data>
255261
</root>

0 commit comments

Comments
 (0)