Skip to content

Commit

Permalink
Merge branch 'master' into TOLK-2629-heldagsfravær
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreMarthinsen authored Oct 22, 2024
2 parents 2a1f872 + d01ff1b commit 3794d83
Show file tree
Hide file tree
Showing 15 changed files with 250 additions and 87 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ public without sharing class HOT_ServiceAppointmentAccessHandler extends MyTrigg

for (ServiceAppointment sa : (List<ServiceAppointment>) records) {
ServiceAppointment oldRecord = (ServiceAppointment) triggerOldMap.get(sa.Id);
if (sa.Status != oldRecord.Status && sa.Status == 'Dispatched') {
if (sa.Status != oldRecord.Status && sa.Status == 'Dispatched' && !system.isBatch()) {
serviceAppointmentsWithUpdatedStatusDispatched.add(sa.Id);
}
}
Expand Down
6 changes: 3 additions & 3 deletions force-app/main/default/classes/HOT_MessagesNotification.cls
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public without sharing class HOT_MessagesNotification {
notification.HOT_NotificationText__c =
'INFO Du har fått en melding fra tolketjenesten.\nFor mer informasjon, se tolkebestilling.nav.no.\n' +
'Du kan ikke svare på denne meldingen.\n' +
'Mvh tolketjenesten i NAV';
'Mvh tolketjenesten i Nav';
notification.HOT_RelatedObject__c = thread.Id;
notification.HOT_RelatedObjectType__c = 'threadInterpreter';

Expand All @@ -152,7 +152,7 @@ public without sharing class HOT_MessagesNotification {
notification.HOT_NotificationText__c =
'INFO Du har fått en melding fra tolketjenesten.\nFor mer informasjon, se tolkebestilling.nav.no.\n' +
'Du kan ikke svare på denne meldingen.\n' +
'Mvh tolketjenesten i NAV';
'Mvh tolketjenesten i Nav';
notification.HOT_RelatedObject__c = thread.Id;
notification.HOT_RelatedObjectType__c = 'threadUser';

Expand Down Expand Up @@ -321,7 +321,7 @@ public without sharing class HOT_MessagesNotification {
notification.HOT_NotificationText__c =
'INFO Du har fått en melding fra tolketjenesten. \nFor mer informasjon, se tolkebestilling.nav.no.\n' +
'Du kan ikke svare på denne meldingen.\n' +
'Mvh tolketjenesten i NAV';
'Mvh tolketjenesten i Nav';
notification.HOT_RelatedObject__c = thread.Id;
notification.HOT_RelatedObjectType__c = 'threadInterpreter';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8" ?>
<FlexiPage xmlns="http://soap.sforce.com/2006/04/metadata">
<flexiPageRegions>
<itemInstances>
Expand Down Expand Up @@ -297,6 +297,24 @@
</itemInstances>
<itemInstances>
<componentInstance>
<componentInstanceProperties>
<name>actionNames</name>
</componentInstanceProperties>
<componentInstanceProperties>
<name>adminFilters</name>
<valueList>
<valueListItems>
<value>Type__c|NOT_EQUAL|[&quot;Incoming SMS&quot;,&quot;Manually Created&quot;]</value>
</valueListItems>
<valueListItems>
<value>Domain__c|EQUALS|[&quot;HOT&quot;]</value>
</valueListItems>
</valueList>
</componentInstanceProperties>
<componentInstanceProperties>
<name>maxRecordsToDisplay</name>
<value>10</value>
</componentInstanceProperties>
<componentInstanceProperties>
<name>parentFieldApiName</name>
<value>Account.Id</value>
Expand All @@ -306,24 +324,122 @@
<value>SMSs__r</value>
</componentInstanceProperties>
<componentInstanceProperties>
<name>relatedListComponentOverride</name>
<name>relatedListDisplayType</name>
<value>ADVGRID</value>
</componentInstanceProperties>
<componentInstanceProperties>
<name>rowsToDisplay</name>
<value>10</value>
<name>relatedListFieldAliases</name>
<valueList>
<valueListItems>
<value>CREATED_DATE</value>
</valueListItems>
<valueListItems>
<value>Type__c</value>
</valueListItems>
<valueListItems>
<value>Status__c</value>
</valueListItems>
<valueListItems>
<value>Message__c</value>
</valueListItems>
</valueList>
</componentInstanceProperties>
<componentInstanceProperties>
<name>relatedListLabel</name>
<value>SMS varsel</value>
</componentInstanceProperties>
<componentInstanceProperties>
<name>showActionBar</name>
<value>false</value>
<value>true</value>
</componentInstanceProperties>
<componentName>force:relatedListSingleContainer</componentName>
<identifier>force_relatedListSingleContainer4</identifier>
<componentInstanceProperties>
<name>sortFieldAlias</name>
<value>CREATED_DATE</value>
</componentInstanceProperties>
<componentInstanceProperties>
<name>sortFieldOrder</name>
<value>Descending</value>
</componentInstanceProperties>
<componentName>lst:dynamicRelatedList</componentName>
<identifier>lst_dynamicRelatedList5</identifier>
</componentInstance>
</itemInstances>
<name>Facet-v4djjigqbto</name>
<type>Facet</type>
</flexiPageRegions>
<flexiPageRegions>
<itemInstances>
<componentInstance>
<componentInstanceProperties>
<name>actionNames</name>
</componentInstanceProperties>
<componentInstanceProperties>
<name>adminFilters</name>
<valueList>
<valueListItems>
<value>Type__c|EQUALS|[&quot;Incoming SMS&quot;,&quot;Manually Created&quot;]</value>
</valueListItems>
<valueListItems>
<value>Domain__c|EQUALS|[&quot;HOT&quot;]</value>
</valueListItems>
</valueList>
</componentInstanceProperties>
<componentInstanceProperties>
<name>maxRecordsToDisplay</name>
<value>30</value>
</componentInstanceProperties>
<componentInstanceProperties>
<name>parentFieldApiName</name>
<value>Account.Id</value>
</componentInstanceProperties>
<componentInstanceProperties>
<name>relatedListApiName</name>
<value>SMSs__r</value>
</componentInstanceProperties>
<componentInstanceProperties>
<name>relatedListDisplayType</name>
<value>ADVGRID</value>
</componentInstanceProperties>
<componentInstanceProperties>
<name>relatedListFieldAliases</name>
<valueList>
<valueListItems>
<value>Type__c</value>
</valueListItems>
<valueListItems>
<value>Status__c</value>
</valueListItems>
<valueListItems>
<value>CREATED_DATE</value>
</valueListItems>
<valueListItems>
<value>Message__c</value>
</valueListItems>
</valueList>
</componentInstanceProperties>
<componentInstanceProperties>
<name>relatedListLabel</name>
<value>Toveis sms dialog med bruker</value>
</componentInstanceProperties>
<componentInstanceProperties>
<name>showActionBar</name>
<value>true</value>
</componentInstanceProperties>
<componentInstanceProperties>
<name>sortFieldAlias</name>
<value>CREATED_DATE</value>
</componentInstanceProperties>
<componentInstanceProperties>
<name>sortFieldOrder</name>
<value>Descending</value>
</componentInstanceProperties>
<componentName>lst:dynamicRelatedList</componentName>
<identifier>lst_dynamicRelatedList3</identifier>
</componentInstance>
</itemInstances>
<name>Facet-ed35f82c-5145-4ea4-9814-09895584c834</name>
<type>Facet</type>
</flexiPageRegions>
<flexiPageRegions>
<itemInstances>
<componentInstance>
Expand Down Expand Up @@ -371,6 +487,20 @@
<identifier>customTab3</identifier>
</componentInstance>
</itemInstances>
<itemInstances>
<componentInstance>
<componentInstanceProperties>
<name>body</name>
<value>Facet-ed35f82c-5145-4ea4-9814-09895584c834</value>
</componentInstanceProperties>
<componentInstanceProperties>
<name>title</name>
<value>SMS dialog</value>
</componentInstanceProperties>
<componentName>flexipage:tab</componentName>
<identifier>flexipage_tab2</identifier>
</componentInstance>
</itemInstances>
<name>Facet-8fafb99b-707e-4994-b87e-977523b80930</name>
<type>Facet</type>
</flexiPageRegions>
Expand Down
25 changes: 17 additions & 8 deletions force-app/main/default/flows/HOT_ReplyOnSMS.flow-meta.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<name>ErrorAssignment</name>
<label>ErrorAssignment</label>
<locationX>314</locationX>
<locationY>758</locationY>
<locationY>674</locationY>
<assignmentItems>
<assignToReference>error</assignToReference>
<operator>Assign</operator>
Expand All @@ -21,7 +21,7 @@
<name>SetSMSValues</name>
<label>SetSMSValues</label>
<locationX>50</locationX>
<locationY>518</locationY>
<locationY>458</locationY>
<assignmentItems>
<assignToReference>sms.Account__c</assignToReference>
<operator>Assign</operator>
Expand Down Expand Up @@ -57,6 +57,13 @@
<stringValue>Manually Created</stringValue>
</value>
</assignmentItems>
<assignmentItems>
<assignToReference>sms.SourceAlternative__c</assignToReference>
<operator>Assign</operator>
<value>
<booleanValue>true</booleanValue>
</value>
</assignmentItems>
<connector>
<targetReference>createSMSRecord</targetReference>
</connector>
Expand All @@ -65,7 +72,7 @@
<name>Is_it_an_incoming_SMS</name>
<label>Is it an incoming SMS</label>
<locationX>314</locationX>
<locationY>278</locationY>
<locationY>242</locationY>
<defaultConnector>
<targetReference>Utg_ende_SMS</targetReference>
</defaultConnector>
Expand All @@ -86,6 +93,7 @@
<label>IsIncomingSMS</label>
</rules>
</decisions>
<environments>Default</environments>
<interviewLabel>HOT_ReplyOnSMS {!$Flow.CurrentDateTime}</interviewLabel>
<label>HOT_ReplyOnSMS</label>
<processMetadataValues>
Expand All @@ -111,7 +119,7 @@
<name>createSMSRecord</name>
<label>createSMSRecord</label>
<locationX>50</locationX>
<locationY>638</locationY>
<locationY>566</locationY>
<faultConnector>
<targetReference>ErrorAssignment</targetReference>
</faultConnector>
Expand All @@ -121,7 +129,7 @@
<name>GetSMSRecord</name>
<label>GetSMSRecord</label>
<locationX>314</locationX>
<locationY>158</locationY>
<locationY>134</locationY>
<assignNullValuesIfNoRecordsFound>false</assignNullValuesIfNoRecordsFound>
<connector>
<targetReference>Is_it_an_incoming_SMS</targetReference>
Expand All @@ -143,7 +151,7 @@
<name>Error_message_0</name>
<label>Error message</label>
<locationX>314</locationX>
<locationY>878</locationY>
<locationY>782</locationY>
<allowBack>true</allowBack>
<allowFinish>true</allowFinish>
<allowPause>true</allowPause>
Expand All @@ -159,7 +167,7 @@
<name>Type_message</name>
<label>Type message</label>
<locationX>50</locationX>
<locationY>398</locationY>
<locationY>350</locationY>
<allowBack>true</allowBack>
<allowFinish>true</allowFinish>
<allowPause>true</allowPause>
Expand All @@ -172,6 +180,7 @@
<fieldType>LargeTextArea</fieldType>
<helpText
>&lt;p&gt;Ikke skriv sensitive opplysninger! Meldingen vil bli sendt til nummeret brukeren har registrert i kontakt og reservasjonsregisteret.&lt;/p&gt;</helpText>
<inputsOnNextNavToAssocScrn>UseStoredValues</inputsOnNextNavToAssocScrn>
<isRequired>true</isRequired>
</fields>
<showFooter>true</showFooter>
Expand All @@ -181,7 +190,7 @@
<name>Utg_ende_SMS</name>
<label>Utgående SMS</label>
<locationX>578</locationX>
<locationY>398</locationY>
<locationY>350</locationY>
<allowBack>true</allowBack>
<allowFinish>true</allowFinish>
<allowPause>true</allowPause>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1244,6 +1244,11 @@
<field>SMS__c.ServiceAppointment__c</field>
<readable>true</readable>
</fieldPermissions>
<fieldPermissions>
<editable>true</editable>
<field>SMS__c.SourceAlternative__c</field>
<readable>true</readable>
</fieldPermissions>
<fieldPermissions>
<editable>true</editable>
<field>SMS__c.Status__c</field>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1055,6 +1055,11 @@
<field>SMS__c.ServiceAppointment__c</field>
<readable>true</readable>
</fieldPermissions>
<fieldPermissions>
<editable>true</editable>
<field>SMS__c.SourceAlternative__c</field>
<readable>true</readable>
</fieldPermissions>
<fieldPermissions>
<editable>false</editable>
<field>SMS__c.Status__c</field>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,9 @@ public with sharing class HOT_FreelanceAbsenceController {
Set<Id> appointmentIds = new Set<Id>();

for (ServiceAppointment appointment : appointments) {
appointment.Status = null;
appointment.Status = 'None';
appointment.HOT_AssignedResourceId__c = '';
appointment.HOT_ServiceResource__c = null;
appointment.HOT_DoNotCreateHAR__c = true;
appointment.HOT_IsNotifyDispatcher__c = true;
appointment.HOT_CanceledByInterpreter__c = true;
Expand Down
Loading

0 comments on commit 3794d83

Please sign in to comment.