Skip to content

Commit 245cd33

Browse files
fix(suite): update to suitecrm version 8.8.0
1 parent 143eba7 commit 245cd33

File tree

15 files changed

+402
-246
lines changed

15 files changed

+402
-246
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2024 Sergey D.
3+
Copyright (c) 2025 Sergey D.
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README_suitecrm.md

Lines changed: 6 additions & 136 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Features:
66
* Forwarding calls to assigned user.
77

88
## Install
9-
**For SuiteCRM 8 minimum working version is 8.5.0!**
9+
**For SuiteCRM 8 minimum working version is 8.8.0!**
1010
* [Install and configure asterlink service](https://github.com/serfreeman1337/asterlink/blob/master/README.md) first.
1111
* Uncomment `suitecrm` entry in `conf.yml` file and set:
1212
* `url` - SuiteCRM site address.
@@ -15,7 +15,7 @@ Features:
1515
**Note:** config file is using YAML format and it requires to have proper indentation.
1616
Use online yaml validator to check your file for errors.
1717
* Download [suitecrm-asterlink-module.zip](https://github.com/serfreeman1337/asterlink/releases/latest/download/suitecrm-asterlink-module.zip) archive from the [releases page](https://github.com/serfreeman1337/asterlink/releases).
18-
**SuiteCRM 8:** Extension in the module archive was built and tested to work with the `8.5.0` version.
18+
**SuiteCRM 8:** Extension in the module archive was built and tested to work with the `8.8.0` version.
1919
* Upload and install this module using **Module Loader** on the SuiteCRM Admin page.
2020
* On the SuiteCRM Admin page open **AsterLink Connector** module settings and set:
2121
* `Token` - to `endpoint_token` value in the `conf.yml` file.
@@ -27,146 +27,16 @@ Features:
2727
* Do a test run of asterlink service. You should see userids from suitecrm in the console.
2828
**Note:** You need to restart the asterlink app evertime you change asterisk extensions for users.
2929

30-
**SuiteCRM 8:** If anything go wrong, simply delete `/extensions/asterlink` and `/cache` folders.
30+
**SuiteCRM 8:** If for some reason suitecrm stop working after installing this module, delete `/extensions/asterlink` and `/cache` folders.
3131

3232
<details>
3333
<summary>
3434
SuiteCRM 8 extension build
3535
</summary>
3636

37-
* Append following to `projects` entry in `angular.json` configuration:
38-
```
39-
"asterlink": {
40-
"projectType": "application",
41-
"schematics": {
42-
"@schematics/angular:component": {
43-
"style": "css"
44-
},
45-
"@schematics/angular:application": {
46-
"strict": true
47-
}
48-
},
49-
"root": "extensions/asterlink/app",
50-
"sourceRoot": "extensions/asterlink/app/src",
51-
"prefix": "app",
52-
"architect": {
53-
"build": {
54-
"builder": "ngx-build-plus:browser",
55-
"options": {
56-
"outputPath": "extensions/asterlink/Resources/public",
57-
"index": "extensions/asterlink/app/src/index.html",
58-
"main": "extensions/asterlink/app/src/main.ts",
59-
"polyfills": "extensions/asterlink/app/src/polyfills.ts",
60-
"tsConfig": "extensions/asterlink/app/tsconfig.app.json",
61-
"inlineStyleLanguage": "css",
62-
"assets": [
63-
"extensions/asterlink/app/src/favicon.ico",
64-
"extensions/asterlink/app/src/assets"
65-
],
66-
"styles": [
67-
"extensions/asterlink/app/src/styles.css"
68-
],
69-
"scripts": [],
70-
"extraWebpackConfig": "extensions/asterlink/app/webpack.config.js",
71-
"commonChunk": false,
72-
"namedChunks": true,
73-
"sourceMap": true,
74-
"aot": true
75-
},
76-
"configurations": {
77-
"production": {
78-
"budgets": [
79-
{
80-
"type": "initial",
81-
"maximumWarning": "2mb",
82-
"maximumError": "5mb"
83-
},
84-
{
85-
"type": "anyComponentStyle",
86-
"maximumWarning": "6kb",
87-
"maximumError": "10kb"
88-
}
89-
],
90-
"fileReplacements": [
91-
{
92-
"replace": "extensions/asterlink/app/src/environments/environment.ts",
93-
"with": "extensions/asterlink/app/src/environments/environment.prod.ts"
94-
}
95-
],
96-
"outputHashing": "all",
97-
"extraWebpackConfig": "extensions/asterlink/app/webpack.prod.config.js",
98-
"optimization": true,
99-
"sourceMap": false,
100-
"namedChunks": true,
101-
"extractLicenses": true,
102-
"vendorChunk": false,
103-
"buildOptimizer": true
104-
},
105-
"dev": {
106-
"buildOptimizer": false,
107-
"optimization": false,
108-
"vendorChunk": false,
109-
"extractLicenses": false,
110-
"sourceMap": true,
111-
"outputPath": "public/extensions/asterlink"
112-
}
113-
},
114-
"defaultConfiguration": "production"
115-
},
116-
"serve": {
117-
"builder": "ngx-build-plus:dev-server",
118-
"configurations": {
119-
"production": {
120-
"browserTarget": "asterlink:build:production",
121-
"extraWebpackConfig": "extensions/asterlink/app/webpack.prod.config.js"
122-
},
123-
"development": {
124-
"browserTarget": "asterlink:build:development"
125-
}
126-
},
127-
"defaultConfiguration": "development",
128-
"options": {
129-
"port": 34000,
130-
"extraWebpackConfig": "extensions/asterlink/app/webpack.config.js"
131-
}
132-
},
133-
"extract-i18n": {
134-
"builder": "ngx-build-plus:extract-i18n",
135-
"options": {
136-
"browserTarget": "asterlink:build",
137-
"extraWebpackConfig": "extensions/asterlink/app/webpack.config.js"
138-
}
139-
},
140-
"test": {
141-
"builder": "@angular-devkit/build-angular:karma",
142-
"options": {
143-
"main": "extensions/asterlink/app/src/test.ts",
144-
"polyfills": "extensions/asterlink/app/src/polyfills.ts",
145-
"tsConfig": "extensions/asterlink/app/tsconfig.spec.json",
146-
"karmaConfig": "extensions/asterlink/app/karma.conf.js",
147-
"inlineStyleLanguage": "css",
148-
"assets": [
149-
"extensions/asterlink/app/src/favicon.ico",
150-
"extensions/asterlink/app/src/assets"
151-
],
152-
"styles": [
153-
"extensions/asterlink/app/src/styles.css"
154-
],
155-
"scripts": []
156-
}
157-
}
158-
}
159-
}
160-
```
161-
* Append following to `scripts` in `package.json` configuration:
162-
```
163-
"run:all": "node node_modules/@angular-architects/module-federation/src/server/mf-dev-server.js",
164-
"build-dev:asterlink": "ng build asterlink --configuration dev",
165-
"build:asterlink": "ng build asterlink --configuration production"
166-
```
167-
* Follow [Front-end Developer Install Guide](https://docs.suitecrm.com/8.x/developer/installation-guide/front-end-installation-guide/).
168-
* Run `yarn run build:asterlink` to build extension.
169-
* More info: [Setting Up a Front-End Extension Module](https://docs.suitecrm.com/8.x/developer/extensions/frontend/fe-extensions-setup/)
37+
* Follow [Front-end Developer Install Guide](https://docs.suitecrm.com/8.x/developer/installation-guide/8.8.0-front-end-installation-guide/).
38+
* Run `yarn merge-angular-json`.
39+
* Run `yarn build:extension asterlink` to build this extension.
17040
</details>
17141

17242
## Forwarding calls to assigned user

connect/suitecrm/suitecrm-asterlink-module/LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2024 Sergey D.
3+
Copyright (c) 2025 Sergey D.
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal
Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
{
2+
"version": 1,
3+
"projects": {
4+
"asterlink": {
5+
"projectType": "application",
6+
"schematics": {
7+
"@schematics/angular:component": {
8+
"style": "scss",
9+
"name": "",
10+
"project": ""
11+
}
12+
},
13+
"root": "extensions/asterlink",
14+
"sourceRoot": "extensions/asterlink/app/src",
15+
"prefix": "app",
16+
"architect": {
17+
"build": {
18+
"builder": "ngx-build-plus:browser",
19+
"options": {
20+
"namedChunks": true,
21+
"commonChunk": false,
22+
"sourceMap": true,
23+
"aot": true,
24+
"outputPath": "extensions/asterlink/public",
25+
"index": "extensions/asterlink/app/src/index.html",
26+
"main": "extensions/asterlink/app/src/main.ts",
27+
"polyfills": "extensions/asterlink/app/src/polyfills.ts",
28+
"tsConfig": "extensions/asterlink/app/tsconfig.app.json",
29+
"assets": [
30+
"extensions/asterlink/app/src/favicon.ico",
31+
"extensions/asterlink/app/src/assets"
32+
],
33+
"styles": [
34+
"extensions/asterlink/app/src/styles.css"
35+
],
36+
"scripts": [],
37+
"extraWebpackConfig": "extensions/asterlink/app/webpack.config.js"
38+
},
39+
"configurations": {
40+
"production": {
41+
"fileReplacements": [
42+
{
43+
"replace": "extensions/asterlink/app/src/environments/environment.ts",
44+
"with": "extensions/asterlink/app/src/environments/environment.prod.ts"
45+
}
46+
],
47+
"optimization": true,
48+
"outputHashing": "all",
49+
"sourceMap": false,
50+
"namedChunks": true,
51+
"extractLicenses": true,
52+
"vendorChunk": false,
53+
"buildOptimizer": true,
54+
"budgets": [
55+
{
56+
"type": "initial",
57+
"maximumWarning": "2mb",
58+
"maximumError": "5mb"
59+
},
60+
{
61+
"type": "anyComponentStyle",
62+
"maximumWarning": "6kb",
63+
"maximumError": "10kb"
64+
}
65+
],
66+
"extraWebpackConfig": "extensions/asterlink/app/webpack.prod.config.js"
67+
},
68+
"dev": {
69+
"outputPath": "public/extensions/asterlink"
70+
}
71+
}
72+
},
73+
"serve": {
74+
"builder": "ngx-build-plus:dev-server",
75+
"options": {
76+
"browserTarget": "services:build",
77+
"extraWebpackConfig": "extensions/asterlink/app/webpack.config.js",
78+
"port": 3000
79+
},
80+
"configurations": {
81+
"production": {
82+
"browserTarget": "services:build:production",
83+
"extraWebpackConfig": "extensions/asterlink/app/webpack.prod.config.js"
84+
}
85+
}
86+
},
87+
"extract-i18n": {
88+
"builder": "@angular-devkit/build-angular:extract-i18n",
89+
"options": {
90+
"buildTarget": "services:build"
91+
}
92+
},
93+
"test": {
94+
"builder": "ngx-build-plus:karma",
95+
"options": {
96+
"main": "extensions/asterlink/app/src/test.ts",
97+
"polyfills": "extensions/asterlink/app/src/polyfills.ts",
98+
"tsConfig": "extensions/asterlink/app/tsconfig.spec.json",
99+
"karmaConfig": "extensions/asterlink/app/karma.conf.js",
100+
"assets": [
101+
"extensions/asterlink/app/src/favicon.ico",
102+
"extensions/asterlink/app/src/assets"
103+
],
104+
"styles": [
105+
"extensions/asterlink/app/src/styles.css"
106+
],
107+
"scripts": [],
108+
"extraWebpackConfig": "extensions/asterlink/app/webpack.config.js"
109+
}
110+
},
111+
"e2e": {
112+
"builder": "@angular-devkit/build-angular:protractor",
113+
"options": {
114+
"protractorConfig": "extensions/asterlink/app/e2e/protractor.conf.js",
115+
"devServerTarget": "services:serve"
116+
},
117+
"configurations": {
118+
"production": {
119+
"devServerTarget": "services:serve:production",
120+
"protractorConfig": ""
121+
}
122+
}
123+
}
124+
}
125+
}
126+
}
127+
}

connect/suitecrm/suitecrm-asterlink-module/extensions/asterlink/app/src/app/app.module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { NgModule } from '@angular/core';
22
import { BrowserModule } from '@angular/platform-browser';
33
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
44
import { AppComponent } from './app.component';
5-
import { ExtensionModule } from '../extension/extension.module';
5+
import { ExtensionModule } from '../extension.module';
66

77
@NgModule({
88
declarations: [

connect/suitecrm/suitecrm-asterlink-module/extensions/asterlink/app/src/components/asterlink/asterlink.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<asterlink-call-card
2-
*ngFor="let call of asterlinkService.calls"
2+
*ngFor="let call of asterlinkService.calls()"
33
[isAnswered]="call.answered"
44
[cid]="call.cid"
55
[did]="call.did"

connect/suitecrm/suitecrm-asterlink-module/extensions/asterlink/app/src/components/asterlink/asterlink.component.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { Component, OnInit } from '@angular/core';
2-
import { trigger, state, style, transition, animate } from '@angular/animations';
1+
import { Component, inject } from '@angular/core';
2+
import { trigger, style, transition, animate } from '@angular/animations';
33
import { AsterlinkService } from '../../services/asterlink.service';
44

55
@Component({
@@ -17,9 +17,6 @@ import { AsterlinkService } from '../../services/asterlink.service';
1717
])
1818
],
1919
})
20-
export class AsterLinkComponent implements OnInit {
21-
constructor(public asterlinkService: AsterlinkService) {}
22-
23-
ngOnInit() {
24-
}
20+
export class AsterLinkComponent {
21+
public asterlinkService = inject(AsterlinkService);
2522
}

connect/suitecrm/suitecrm-asterlink-module/extensions/asterlink/app/src/components/call-card/call-card.component.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Component, Input } from '@angular/core';
1+
import { Component, inject, Input } from '@angular/core';
22
import { AsterlinkService } from '../../services/asterlink.service';
33

44
@Component({
@@ -15,8 +15,5 @@ export class CallCardComponent {
1515
@Input() time: string;
1616
@Input() relations: any;
1717

18-
constructor(
19-
public asterlinkService: AsterlinkService
20-
) {
21-
}
18+
public asterlinkService = inject(AsterlinkService);
2219
}

connect/suitecrm/suitecrm-asterlink-module/extensions/asterlink/app/src/directives/stop-tel-link.directive.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Directive, HostListener, Input } from '@angular/core';
1+
import { Directive, HostListener } from '@angular/core';
22
import { AsterlinkService } from '../services/asterlink.service';
33

44
@Directive({

0 commit comments

Comments
 (0)