Last active
August 12, 2019 16:31
-
-
Save anoopt/1c3836a722cf716ea0b543fa07f0642e to your computer and use it in GitHub Desktop.
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
<?xml version="1.0"?> | |
<pnp:Provisioning xmlns:pnp="http://schemas.dev.office.com/PnP/2019/03/ProvisioningSchema"> | |
<pnp:Preferences Generator="OfficeDevPnP.Core, Version=3.11.1907.0, Culture=neutral, PublicKeyToken=5e633289e95c321a" /> | |
<pnp:Templates ID="CONTAINER-TEMPLATE-B9D2B44044754FDABAF4CAED363D789E"> | |
<pnp:ProvisioningTemplate ID="TEMPLATE-B9D2B44044754FDABAF4CAED363D789E" Version="1" BaseSiteTemplate="GROUP#0" Scope="RootSite"> | |
<pnp:Lists> | |
<pnp:ListInstance Title="Leave Requests" Description="" DocumentTemplate="" OnQuickLaunch="true" TemplateType="100" Url="Lists/Leave Requests" MinorVersionLimit="0" MaxVersionLimit="0" DraftVersionVisibility="0" TemplateFeatureID="00bfea71-de22-43b2-a848-c05709900100" EnableFolderCreation="false" DefaultDisplayFormUrl="{site}/Lists/Leave Requests/DispForm.aspx" DefaultEditFormUrl="{site}/Lists/Leave Requests/EditForm.aspx" DefaultNewFormUrl="{site}/Lists/Leave Requests/NewForm.aspx" ImageUrl="/_layouts/15/images/itgen.gif?rev=47" IrmExpire="false" IrmReject="false" IsApplicationList="false" ValidationFormula="" ValidationMessage=""> | |
<pnp:ContentTypeBindings> | |
<pnp:ContentTypeBinding ContentTypeID="0x01" Default="true" /> | |
<pnp:ContentTypeBinding ContentTypeID="0x0120" /> | |
</pnp:ContentTypeBindings> | |
<pnp:Views> | |
<View Name="{55DD51D5-C4AE-4A2E-B785-716711B24908}" DefaultView="TRUE" MobileView="TRUE" MobileDefaultView="TRUE" Type="HTML" DisplayName="All Items" Url="{site}/Lists/Leave Requests/AllItems.aspx" Level="1" BaseViewID="1" ContentTypeID="0x" ImageUrl="/_layouts/15/images/generic.png?rev=47"> | |
<Query> | |
<OrderBy> | |
<FieldRef Name="ID" /> | |
</OrderBy> | |
</Query> | |
<ViewFields> | |
<FieldRef Name="LinkTitle" /> | |
<FieldRef Name="Manager" /> | |
<FieldRef Name="From" /> | |
<FieldRef Name="To" /> | |
<FieldRef Name="Days" /> | |
<FieldRef Name="ApprovalId" /> | |
<FieldRef Name="Status" /> | |
<FieldRef Name="RequestedBy" /> | |
</ViewFields> | |
<RowLimit Paged="TRUE">30</RowLimit> | |
<JSLink>clienttemplates.js</JSLink> | |
<CustomFormatter><![CDATA[{ | |
"schema": "https://developer.microsoft.com/json-schemas/sp/view-formatting.schema.json", | |
"debugMode": false, | |
"hideSelection": true, | |
"hideColumnHeader": true, | |
"rowFormatter": { | |
"elmType": "div", | |
"attributes": { | |
"class": " ms-borderColor-neutralLight" | |
}, | |
"style": { | |
"border-top-width": "1px", | |
"border-top-style": "none", | |
"width": "100%", | |
"padding": "0 0 0 20px", | |
"flex-wrap": "wrap", | |
"align-items": "flex-start", | |
"justify-content": "space-between" | |
}, | |
"children": [ | |
{ | |
"elmType": "div", | |
"style": { | |
"flex": "1 0 200px", | |
"margin": "10px", | |
"height":"108px" | |
}, | |
"attributes": { | |
"class": "ms-bgColor-neutralLighter" | |
}, | |
"children": [ | |
{ | |
"elmType": "button", | |
"attributes": { | |
"class": "ms-fontSize-xl ms-fontColor-themePrimary" | |
}, | |
"style": { | |
"border": "0", | |
"padding": "0", | |
"margin-left":"10px", | |
"margin-bottom": "0.5em", | |
"background-color": "transparent", | |
"cursor": "pointer", | |
"line-height": "1.5em", | |
"overflow": "hidden", | |
"text-align": "left" | |
}, | |
"customRowAction": { | |
"action": "defaultClick" | |
}, | |
"txtContent": "[$Title]" | |
}, | |
{ | |
"elmType": "div", | |
"attributes": { | |
"class": "ms-fontSize-mPlus" | |
}, | |
"style": { | |
"line-height": "1.5em", | |
"margin-left":"10px" | |
}, | |
"children": [ | |
{ | |
"elmType": "span", | |
"txtContent": "Requested by : " | |
}, | |
{ | |
"elmType": "span", | |
"attributes": { | |
"class": "ms-fontWeight-bold" | |
}, | |
"txtContent": "[$RequestedBy.title]" | |
} | |
] | |
} | |
] | |
}, | |
{ | |
"elmType": "div", | |
"style": { | |
"flex": "0 0 900px", | |
"width": "800px", | |
"margin": "10px", | |
"display": "flex", | |
"justify-content": "space-between" | |
}, | |
"children": [ | |
{ | |
"elmType": "div", | |
"attributes": { | |
"class": "ms-bgColor-neutralLighter" | |
}, | |
"style": { | |
"flex": "0 0 173px", | |
"height": "108px", | |
"text-align": "center" | |
}, | |
"children": [ | |
{ | |
"elmType": "img", | |
"attributes": { | |
"src": "='https://outlook.office365.com/owa/service.svc/s/GetPersonaPhoto?email='+ [$RequestedBy.email] +'&UA=0&size=HR96x96'", | |
"title": "[$RequestedBy.title]" | |
}, | |
"style": { | |
"border": "1px solid #808080", | |
"border-radius": "50%", | |
"left": "50%", | |
"width": "48px", | |
"height": "48px", | |
"margin-left": "15px", | |
"margin-top": "25px" | |
} | |
} | |
] | |
}, | |
{ | |
"elmType": "div", | |
"attributes": { | |
"class": "ms-bgColor-neutralLighter" | |
}, | |
"style": { | |
"flex": "0 0 173px", | |
"height": "108px", | |
"text-align": "center" | |
}, | |
"children": [ | |
{ | |
"elmType": "div", | |
"attributes": { | |
"class": "ms-fontSize-l ms-fontWeight-light" | |
}, | |
"style": { | |
"line-height": "1.1429em", | |
"vertical-align": "middle", | |
"margin-top": "20px", | |
"text-align": "center" | |
}, | |
"txtContent": "='From: ' + [$From]" | |
}, | |
{ | |
"elmType": "div", | |
"attributes": { | |
"class": "ms-fontSize-l ms-fontWeight-light" | |
}, | |
"style": { | |
"line-height": "1.1429em", | |
"vertical-align": "middle", | |
"margin-top": "5px", | |
"text-align": "center" | |
}, | |
"txtContent": "='To: '+[$To]" | |
} | |
] | |
}, | |
{ | |
"elmType": "div", | |
"attributes": { | |
"class": "=if([$Status] == 'Pending with manager', 'ms-bgColor-yellow', if([$Status] == 'Approved', 'ms-bgColor-green', 'ms-bgColor-red'))" | |
}, | |
"style": { | |
"flex": "0 0 173px", | |
"display": "flex", | |
"justify-content": "center", | |
"align-items": "center", | |
"border-top-width": "=if([$Status] == 'Pending with manager', '5px', '0')", | |
"border-top-style": "solid", | |
"color": "=if([$Status] == 'Pending with manager', 'black', 'white')" | |
}, | |
"children": [ | |
{ | |
"elmType": "div", | |
"style": { | |
"text-align": "center" | |
}, | |
"children": [ | |
{ | |
"elmType": "div", | |
"attributes": { | |
"class": "ms-fontSize-l" | |
}, | |
"style": { | |
"line-height": "1.5em" | |
}, | |
"txtContent": "[$Status]" | |
}, | |
{ | |
"elmType": "div", | |
"style": { | |
"display": "=if([$Status], '', 'none')", | |
"font-size": "=if([$Status] == 'Approved' || [$Status] == 'Rejected', '80px', '30px')", | |
"line-height": "40px", | |
"color": "=if([$Status] == 'Pending with manager', 'black', 'white')" | |
}, | |
"attributes": { | |
"iconName": "=if([$Status] == 'Pending with manager', 'Clock', if([$Status] == 'Approved', 'StatusCircleCheckmark', 'StatusCircleErrorX'))" | |
} | |
} | |
] | |
} | |
] | |
}, | |
{ | |
"elmType": "div", | |
"attributes": { | |
"class": "ms-bgColor-neutralLighter" | |
}, | |
"style": { | |
"flex": "0 0 173px", | |
"height": "108px", | |
"text-align": "center" | |
}, | |
"children": [ | |
{ | |
"elmType": "div", | |
"attributes": { | |
"class": "ms-fontSize-su ms-fontWeight-light" | |
}, | |
"style": { | |
"line-height": "1.1429em", | |
"vertical-align": "middle", | |
"margin-top": "20px", | |
"text-align": "center" | |
}, | |
"txtContent": "=[$Days]+' days'" | |
} | |
] | |
}, | |
{ | |
"elmType": "div", | |
"attributes": { | |
"class": "ms-bgColor-neutralLighter" | |
}, | |
"style": { | |
"flex": "0 0 173px", | |
"height": "108px", | |
"text-align": "center" | |
}, | |
"children": [ | |
{ | |
"elmType": "a", | |
"attributes": { | |
"class": "ms-fontSize-l ms-fontWeight-light ms-bgColor-green", | |
"href": "='https://unitedkingdom.flow.microsoft.com/manage/environments/Default-5bd7accd-aacc-bbef-cade-d56faad3f1ab/approvals/received/' + [$ApprovalId] + '?response=Approve'", | |
"target": "_blank" | |
}, | |
"style": { | |
"display": "=if([$Status] == 'Approved' || [$Status] == 'Rejected', 'none', 'inline-block')", | |
"line-height": "1.1429em", | |
"vertical-align": "middle", | |
"text-align": "center", | |
"float": "left", | |
"padding": "10px", | |
"border-radius": "3px", | |
"color": "white", | |
"width": "80%", | |
"margin": "5px" | |
}, | |
"txtContent": "Approve" | |
}, | |
{ | |
"elmType": "a", | |
"attributes": { | |
"class": "ms-fontSize-l ms-fontWeight-light ms-bgColor-red", | |
"href": "='https://unitedkingdom.flow.microsoft.com/manage/environments/Default-5bd7accd-aacc-bbef-cade-d56faad3f1ab/approvals/received/' + [$ApprovalId] + '?response=Reject'", | |
"target": "_blank" | |
}, | |
"style": { | |
"display": "=if([$Status] == 'Approved' || [$Status] == 'Rejected', 'none', 'inline-block')", | |
"line-height": "1.1429em", | |
"vertical-align": "middle", | |
"margin-top": "15px", | |
"text-align": "center", | |
"float": "left", | |
"padding": "10px", | |
"border-radius": "3px", | |
"color": "white", | |
"width": "80%", | |
"margin": "5px" | |
}, | |
"txtContent": "Reject" | |
}, | |
{ | |
"elmType": "div", | |
"attributes": { | |
"class": "ms-fontSize-l ms-fontWeight-light" | |
}, | |
"style": { | |
"display": "=if([$Status] == 'Approved' || [$Status] == 'Rejected', '', 'none')", | |
"line-height": "1.1429em", | |
"vertical-align": "middle", | |
"margin-top": "40px" | |
}, | |
"txtContent": "Not available for approval." | |
} | |
] | |
} | |
] | |
} | |
] | |
} | |
}]]></CustomFormatter> | |
</View> | |
</pnp:Views> | |
<pnp:Fields> | |
<Field DisplayName="Manager" Format="Dropdown" List="UserInfo" Name="Manager" Title="Manager" Type="User" UserSelectionMode="0" UserSelectionScope="0" ID="{65650b02-dbf0-40ae-a19a-084e1da2f2e0}" SourceID="{{listid:Leave Requests}}" StaticName="Manager" ColName="int1" RowOrdinal="0" /> | |
<Field Name="From" FromBaseType="FALSE" Type="Text" DisplayName="From" Required="FALSE" EnforceUniqueValues="FALSE" Indexed="FALSE" MaxLength="255" ID="{99f9d701-9a0b-4d44-a118-2868197f1e52}" Version="1" StaticName="From" SourceID="{{listid:Leave Requests}}" ColName="nvarchar4" RowOrdinal="0" /> | |
<Field Name="To" FromBaseType="FALSE" Type="Text" DisplayName="To" Required="FALSE" EnforceUniqueValues="FALSE" Indexed="FALSE" MaxLength="255" ID="{c54bec20-81c0-4877-ba9f-c7e86628538c}" Version="1" StaticName="To" SourceID="{{listid:Leave Requests}}" ColName="nvarchar5" RowOrdinal="0" /> | |
<Field Type="Text" DisplayName="Days" Required="FALSE" EnforceUniqueValues="FALSE" Indexed="FALSE" MaxLength="255" ID="{b4e002d4-91cb-4a6e-8dc9-bd9d04d9e8f7}" SourceID="{{listid:Leave Requests}}" StaticName="Days" Name="Days" ColName="nvarchar6" RowOrdinal="0" /> | |
<Field DisplayName="ApprovalId" Format="Dropdown" MaxLength="255" Name="ApprovalId" Title="ApprovalId" Type="Text" ID="{c49f0855-c17f-4af4-914c-e99b9f724323}" SourceID="{{listid:Leave Requests}}" StaticName="ApprovalId" ColName="nvarchar7" RowOrdinal="0" /> | |
<Field Type="Choice" DisplayName="Status" Required="FALSE" EnforceUniqueValues="FALSE" Indexed="FALSE" Format="Dropdown" FillInChoice="FALSE" ID="{bd986693-35fb-44c5-9136-1bb9a5b63163}" SourceID="{{listid:Leave Requests}}" StaticName="Status" Name="Status" ColName="nvarchar8" RowOrdinal="0" CustomFormatter="" Version="1"> | |
<Default>Pending with manager</Default> | |
<CHOICES> | |
<CHOICE>Pending with manager</CHOICE> | |
<CHOICE>Approved</CHOICE> | |
<CHOICE>Rejected</CHOICE> | |
</CHOICES> | |
</Field> | |
<Field Type="User" DisplayName="RequestedBy" List="UserInfo" Required="FALSE" EnforceUniqueValues="FALSE" ShowField="ImnName" UserSelectionMode="PeopleOnly" UserSelectionScope="0" ID="{1a88a68d-8383-4371-a997-039afff0f74f}" SourceID="{{listid:Leave Requests}}" StaticName="RequestedBy" Name="RequestedBy" ColName="int2" RowOrdinal="0" /> | |
</pnp:Fields> | |
</pnp:ListInstance> | |
</pnp:Lists> | |
</pnp:ProvisioningTemplate> | |
</pnp:Templates> | |
</pnp:Provisioning> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment