-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit f489440
Showing
43 changed files
with
3,926 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
**/.classpath | ||
**/.dockerignore | ||
**/.env | ||
**/.git | ||
**/.gitignore | ||
**/.project | ||
**/.settings | ||
**/.toolstarget | ||
**/.vs | ||
**/.vscode | ||
**/*.*proj.user | ||
**/*.dbmdl | ||
**/*.jfm | ||
**/bin | ||
**/charts | ||
**/docker-compose* | ||
**/compose* | ||
**/Dockerfile* | ||
**/node_modules | ||
**/npm-debug.log | ||
**/obj | ||
**/secrets.dev.yaml | ||
**/values.dev.yaml | ||
README.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
################################################################################ | ||
# This .gitignore file was automatically created by Microsoft(R) Visual Studio. | ||
################################################################################ | ||
|
||
/CCOF.Infrastructure.WebAPI/appsettings.Development.json | ||
/CCOF.Infrastructure.WebAPI/bin/Debug/net6.0 | ||
/CCOF.Infrastructure.WebAPI/obj |
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": ".NET Core Launch (web)", | ||
"type": "coreclr", | ||
"request": "launch", | ||
"preLaunchTask": "build", | ||
"program": "${workspaceFolder}/CCOF.Infrastructure.WebAPI/bin/Debug/net6.0/CCOF.Infrastructure.WebAPI.dll", | ||
"args": [], | ||
"cwd": "${workspaceFolder}/CCOF.Infrastructure.WebAPI", | ||
"stopAtEntry": false, | ||
"serverReadyAction": { | ||
"action": "openExternally", | ||
"pattern": "\\bNow listening on:\\s+(https?://\\S+)" | ||
}, | ||
"env": { | ||
"ASPNETCORE_ENVIRONMENT": "Development" | ||
}, | ||
"sourceFileMap": { | ||
"/Views": "${workspaceFolder}/Views" | ||
} | ||
}, | ||
{ | ||
"name": ".NET Core Attach", | ||
"type": "coreclr", | ||
"request": "attach" | ||
}, | ||
{ | ||
"name": "Docker .NET Core Launch", | ||
"type": "docker", | ||
"request": "launch", | ||
"preLaunchTask": "docker-run: debug", | ||
"netCore": { | ||
"appProject": "${workspaceFolder}/CCOF.Infrastructure.WebAPI/CCOF.Infrastructure.WebAPI.csproj" | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "build", | ||
"command": "dotnet", | ||
"type": "process", | ||
"args": [ | ||
"build", | ||
"${workspaceFolder}/CCOF.Infrastructure.WebAPI/CCOF.Infrastructure.WebAPI.csproj", | ||
"/property:GenerateFullPaths=true", | ||
"/consoleloggerparameters:NoSummary" | ||
], | ||
"problemMatcher": "$msCompile" | ||
}, | ||
{ | ||
"label": "publish", | ||
"command": "dotnet", | ||
"type": "process", | ||
"args": [ | ||
"publish", | ||
"${workspaceFolder}/CCOF.Infrastructure.WebAPI/CCOF.Infrastructure.WebAPI.csproj", | ||
"/property:GenerateFullPaths=true", | ||
"/consoleloggerparameters:NoSummary" | ||
], | ||
"problemMatcher": "$msCompile" | ||
}, | ||
{ | ||
"label": "watch", | ||
"command": "dotnet", | ||
"type": "process", | ||
"args": [ | ||
"watch", | ||
"run", | ||
"--project", | ||
"${workspaceFolder}/CCOF.Infrastructure.WebAPI/CCOF.Infrastructure.WebAPI.csproj" | ||
], | ||
"problemMatcher": "$msCompile" | ||
}, | ||
{ | ||
"type": "docker-build", | ||
"label": "docker-build: debug", | ||
"dependsOn": [ | ||
"build" | ||
], | ||
"dockerBuild": { | ||
"tag": "ccof:dev", | ||
"target": "base", | ||
"dockerfile": "${workspaceFolder}/CCOF.Infrastructure.WebAPI/Dockerfile", | ||
"context": "${workspaceFolder}", | ||
"pull": true | ||
}, | ||
"netCore": { | ||
"appProject": "${workspaceFolder}/CCOF.Infrastructure.WebAPI/CCOF.Infrastructure.WebAPI.csproj" | ||
} | ||
}, | ||
{ | ||
"type": "docker-build", | ||
"label": "docker-build: release", | ||
"dependsOn": [ | ||
"build" | ||
], | ||
"dockerBuild": { | ||
"tag": "ccof:latest", | ||
"dockerfile": "${workspaceFolder}/CCOF.Infrastructure.WebAPI/Dockerfile", | ||
"context": "${workspaceFolder}", | ||
"pull": true | ||
}, | ||
"netCore": { | ||
"appProject": "${workspaceFolder}/CCOF.Infrastructure.WebAPI/CCOF.Infrastructure.WebAPI.csproj" | ||
} | ||
}, | ||
{ | ||
"type": "docker-run", | ||
"label": "docker-run: debug", | ||
"dependsOn": [ | ||
"docker-build: debug" | ||
], | ||
"dockerRun": {}, | ||
"netCore": { | ||
"appProject": "${workspaceFolder}/CCOF.Infrastructure.WebAPI/CCOF.Infrastructure.WebAPI.csproj", | ||
"enableDebugging": true | ||
} | ||
}, | ||
{ | ||
"type": "docker-run", | ||
"label": "docker-run: release", | ||
"dependsOn": [ | ||
"docker-build: release" | ||
], | ||
"dockerRun": {}, | ||
"netCore": { | ||
"appProject": "${workspaceFolder}/CCOF.Infrastructure.WebAPI/CCOF.Infrastructure.WebAPI.csproj" | ||
} | ||
} | ||
] | ||
} |
59 changes: 59 additions & 0 deletions
59
CCOF.Application.WebResources/Scripts/Common/ccof_Common.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
"use strict"; | ||
|
||
var CCOF = CCOF || {}; | ||
CCOF.Common = CCOF.Common || { GLOBAL_FORM_CONTEXT: null }; | ||
|
||
/** | ||
* This function calls the default lookup query for a field. If the query returns only one result than the field is updated with that value. | ||
* @param {any} formContext Form Context | ||
* @param {any} fieldName Logical Name of the field | ||
* @param {any} entityLogicalName Logical Name of the entity | ||
* @param {any} entityIdField Logical Name of the ID field on the entity (usually the entity name followed by id) | ||
* @param {any} entityDisplayField Logical Name of the display field on the entity (usually name or prefix_name unless changed when entity is created) | ||
* @param {any} filterFetch Optional: filtering FetchXML for the lookup | ||
*/ | ||
CCOF.Common.DefaultLookupIfSingle = function (formContext, fieldName, entityLogicalName, entityIdField, entityDisplayField, filterFetch) { | ||
|
||
//Get Default View for lookup | ||
var defaultView = formContext.getControl(fieldName).getDefaultView(); | ||
|
||
//Get Fetch XML for the View | ||
Xrm.WebApi.retrieveRecord("savedquery", defaultView, "?$select=fetchxml").then( | ||
function success(result) { | ||
|
||
var fetchXML = result.fetchxml; | ||
|
||
if (filterFetch !== null && filterFetch.length > 0) { | ||
filterFetch = filterFetch + "</entity></fetch>"; | ||
fetchXML = fetchXML.replace("</entity></fetch>", filterFetch); | ||
} | ||
|
||
//Now retrieve records from Fetch | ||
Xrm.WebApi.retrieveMultipleRecords(entityLogicalName, "?fetchXml=" +fetchXML).then( | ||
function success(result) { | ||
|
||
if (result.entities.length === 1) { | ||
//only 1 result, so populate dropdown with it | ||
var singleRecord = result.entities[0]; | ||
var recordId = singleRecord[entityIdField]; | ||
var recordValue = singleRecord[entityDisplayField]; | ||
|
||
formContext.getAttribute(fieldName).setValue([{ id: recordId, name: recordValue, entityType: entityLogicalName}]); | ||
} | ||
else { | ||
//blank out lookup | ||
formContext.getAttribute(fieldName).setValue(null); | ||
} | ||
}, | ||
function (error) { | ||
} | ||
|
||
); | ||
|
||
}, | ||
function (error) { | ||
console.log(error.message); | ||
// handle error conditions | ||
} | ||
); | ||
} |
41 changes: 41 additions & 0 deletions
41
CCOF.Application.WebResources/Scripts/FormHandler/ccof_Account.Form.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// A webresource for AccountForm only | ||
|
||
//Create Namespace Object if its defined | ||
if (typeof (CCOF) === "undefined") { | ||
CCOF = {}; | ||
} else { | ||
|
||
} | ||
|
||
//Formload logic starts here | ||
CCOF.Account.Form = { | ||
onLoad: function (executionContext) { | ||
let formContext = executionContext.getFormContext(); | ||
switch (formContext.ui.getFormType()) { | ||
case 0: //undefined | ||
break; | ||
case 1: //Create/QuickCreate | ||
|
||
case 2: // update | ||
|
||
break; | ||
case 3: //readonly | ||
break; | ||
case 4: //disable | ||
break; | ||
case 6: //bulkedit | ||
break; | ||
} | ||
}, | ||
|
||
let formContext = executionContext.getFormContext(); | ||
const currentdate = new Date(); | ||
formContext.getAttribute(destinationColumns).setValue(currentdate); | ||
formContext.data.entity.save(); | ||
|
||
}, | ||
//A function called on save | ||
onSave: function (executionContext) { | ||
|
||
} | ||
}; |
2 changes: 2 additions & 0 deletions
2
CCOF.Application.WebResources/Scripts/Lib/jquery-3.6.0.min.js
Large diffs are not rendered by default.
Oops, something went wrong.
16 changes: 16 additions & 0 deletions
16
CCOF.Application.WebResources/Scripts/Ribbon/ccof_Account.Ribbon.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// A webresource for AccountRibbon only | ||
|
||
//Create Namespace Object if its defined | ||
if (typeof (CCOF) === "undefined") { | ||
CCOF = {}; | ||
} else { | ||
|
||
} | ||
|
||
CCOF.Account.Ribbon = { | ||
// description | ||
anewFunction: function (primaryControl, selectedIds) { | ||
var formContext = primaryControl; | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup> | ||
<MSBuildAllProjects Condition="'$(MSBuildVersion)' == '' Or '$(MSBuildVersion)' < '16.0'">$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects> | ||
<HasSharedItems>true</HasSharedItems> | ||
<SharedGUID>7e11d821-093b-4e0c-b139-04348871a472</SharedGUID> | ||
</PropertyGroup> | ||
<PropertyGroup Label="Configuration"> | ||
<Import_RootNamespace>CCOF.Core.DataContext</Import_RootNamespace> | ||
</PropertyGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup Label="Globals"> | ||
<ProjectGuid>7e11d821-093b-4e0c-b139-04348871a472</ProjectGuid> | ||
<MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion> | ||
</PropertyGroup> | ||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | ||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.Common.Default.props" /> | ||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.Common.props" /> | ||
<PropertyGroup /> | ||
<Import Project="CCOF.Core.DataContext.projitems" Label="Shared" /> | ||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.CSharp.targets" /> | ||
</Project> |
33 changes: 33 additions & 0 deletions
33
CCOF.Infrastructure.WebAPI/CCOF.Infrastructure.WebAPI.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<Project Sdk="Microsoft.NET.Sdk.Web"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net6.0</TargetFramework> | ||
<Nullable>enable</Nullable> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<Compile Remove="Middlewares\**" /> | ||
<Content Remove="Middlewares\**" /> | ||
<EmbeddedResource Remove="Middlewares\**" /> | ||
<None Remove="Middlewares\**" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<Compile Remove="Controllers\ActionController.cs" /> | ||
<Compile Remove="Controllers\AuthenticationController.cs" /> | ||
<Compile Remove="Controllers\ContractFilesController.cs" /> | ||
<Compile Remove="Controllers\CustomActionController.cs" /> | ||
<Compile Remove="Controllers\MetadataController.cs" /> | ||
<Compile Remove="Services\AuthenticationService.cs" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.8" /> | ||
<PackageReference Include="Microsoft.IdentityModel.Clients.ActiveDirectory" Version="3.19.8" /> | ||
<PackageReference Include="Microsoft.IdentityModel.Tokens" Version="6.22.0" /> | ||
<PackageReference Include="Microsoft.PowerPlatform.Dataverse.Client" Version="1.0.9" /> | ||
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.2.3" /> | ||
</ItemGroup> | ||
|
||
</Project> |
11 changes: 11 additions & 0 deletions
11
CCOF.Infrastructure.WebAPI/CCOF.Infrastructure.WebAPI.csproj.user
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup> | ||
<Controller_SelectedScaffolderID>MvcControllerEmptyScaffolder</Controller_SelectedScaffolderID> | ||
<Controller_SelectedScaffolderCategoryPath>root/Common/MVC/Controller</Controller_SelectedScaffolderCategoryPath> | ||
<ActiveDebugProfile>CCOF.Infrastructure.WebAPI</ActiveDebugProfile> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> | ||
<DebuggerFlavor>ProjectDebugger</DebuggerFlavor> | ||
</PropertyGroup> | ||
</Project> |
Oops, something went wrong.