6 Commits

2 changed files with 68 additions and 2 deletions

3
.gitignore vendored
View File

@@ -1,2 +1,3 @@
node_modules
.vscode
.vscode
.idea

View File

@@ -1,5 +1,70 @@
# Outlook Plugin
# Outlook Plugin Lokale Development & Test Setup
Deze instructies helpen je om de Outlook plugin lokaal te draaien, publiekelijk toegankelijk te maken via ngrok (of een vergelijkbare tool), en de manifest file aan te passen voor lokale debugging.
---
## Stappen
### 1. URL's in project aanpassen
Start een tunnel van je lokale omgeving zodat hij publiekelijk toegangelijk is.<br><small>**(Je kan hiervoor expose of ngrok gebruiken)**</small>
Verander de URL's in ``src/taskpane/taskpane.js`` naar jouw tunnel URL.
**Voorbeeld**:
```js
const localApiUrl = "https://ewn51fphu7.sharedwithexpose.com/api/zoek_bestelling";
const orderUrlEdit = "https://ewn51fphu7.sharedwithexpose.com/bestellingen/edit/";
const orderUrlIndex = "https://ewn51fphu7.sharedwithexpose.com/bestellingen";
const apiCredentialUrl = "https://ewn51fphu7.sharedwithexpose.com/api/api_credentials";
```
### 2.Manifest.xml aanpassen
Ga naar ``manifest.xml`` in de root folder.
Verander elke URL genaamd: ```https://outlookplugin.ovas.nl``` naar ``https://localhost:3000``
### 3. Lokale server draaien
Start je lokale development server, bijvoorbeeld op poort 8080:
```bash
npm run start
````
### 4. Aanpassingen in Soco-Backoffice project
a. Verander in ```Api.class.php:108```
```php
$_SERVER['HTTP_ORIGIN'] === 'https://outlookplugin.ovas.nl'
```
naar
```php
$_SERVER['HTTP_ORIGIN'] === 'https://localhost:3000'
```
b. Verander in ``api_credentials.class.php:31``
```php
$response = [
'key' => 'Uvk3eiHf2NB8ahRC1ijXp0N1YrrhZ1eakIG9gTA0'
];
````
naar
```php
$response = [
'key' => 'kstlkkRb85jWbS424SXs6bw0rMmJDAcLrUJD05sL'
];
````
Deze key kan je vinden in ```settings_dev.php:252```
### 5. Plugin 'starten'
Voer het volgende commando uit om de plugin in Outlook te openen;
```bash
npm run start
```
## Overzicht
De gehele sourcecode van de plugin bevindt zich op: src/taskpane
@@ -7,7 +72,7 @@ De gehele sourcecode van de plugin bevindt zich op: src/taskpane
In die folder heb je de HTML, CSS & JS bestanden.
Zodra er aanpassingen zijn gemaakt moet je het volgende commando runnen;
```console
```bash
npm run build
```