ContactsModalStructure.js
1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import _ from 'lodash';
class ContactModals {
AddContactRequest = (cntSin, modalName) => {
let contactsStructure = JSON.parse(localStorage.getItem("ContactsModel"));
if (contactsStructure.Contacts.length != 0)
{
_.remove(contactsStructure.Contacts, {
ContactFormName : modalName
} )
}
contactsStructure.Contacts.push(cntSin);
localStorage.setItem("ContactsModel", JSON.stringify(contactsStructure));
/*contactsStructure = {
"Contacts" : [
ContactStructure = {
ContactFormName: "",
BusinessName: "",
Email: "",
PhoneNumber: "",
PrivacyAck: false,
AllowContact: false
}
]
}*/
//localStorage.setItem("ContactsModel", JSON.stringify(response.data));
}
GetContactByModalName = (modalName) => {
}
DeleteContactRequest = (cntSin) => {
}
}
export {ContactModals}