Skip to content

Commit cd510e9

Browse files
committed
fix: #WB-3888 add missing directive import
1 parent 9545cd4 commit cd510e9

File tree

1 file changed

+45
-44
lines changed
  • directory/src/main/resources/public/ts

1 file changed

+45
-44
lines changed
+45-44
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,53 @@
1-
import { routes, ng } from 'entcore';
2-
import { accountController } from './controllers/account';
3-
import { classAdminController } from './admin/controller';
4-
import { directoryController } from './controllers/directory';
5-
import { adaptiveHeight } from './directives/adaptiveHeight';
1+
import { ng, routes } from "entcore";
2+
import { classAdminController } from "./admin/controller";
3+
import { accountController } from "./controllers/account";
4+
import { directoryController } from "./controllers/directory";
5+
import { adaptiveHeight } from "./directives/adaptiveHeight";
6+
import { intlPhoneInputDirective } from "./directives/intlPhoneInput";
67

78
routes.define(function ($routeProvider) {
8-
if (window.location.href.indexOf('mon-compte') !== -1) {
9-
$routeProvider
10-
.when('/edit-user/:id', {
11-
action: 'editUser'
12-
})
13-
.when('/edit-user-infos/:id', {
14-
action: 'editUserInfos'
15-
})
16-
.when('/edit-me', {
17-
action: 'editMe'
18-
})
19-
.when('/themes', {
20-
action: 'themes'
21-
})
22-
.otherwise({
23-
redirectTo: 'edit-me'
24-
});
25-
}
26-
else {
27-
$routeProvider
28-
.when('/search', {
29-
action: 'directory'
30-
})
31-
.when('/myClass', {
32-
action: 'myClass'
33-
})
34-
.when("/user-view/:userId", {
35-
action: "viewUser"
36-
})
37-
.when('/:userId', {
38-
action: 'viewUser'
39-
})
40-
.when('/group-view/:groupId', {
41-
action: 'viewGroup'
42-
})
43-
.otherwise({
44-
redirectTo: '/myClass'
45-
});
46-
}
9+
if (window.location.href.indexOf("mon-compte") !== -1) {
10+
$routeProvider
11+
.when("/edit-user/:id", {
12+
action: "editUser",
13+
})
14+
.when("/edit-user-infos/:id", {
15+
action: "editUserInfos",
16+
})
17+
.when("/edit-me", {
18+
action: "editMe",
19+
})
20+
.when("/themes", {
21+
action: "themes",
22+
})
23+
.otherwise({
24+
redirectTo: "edit-me",
25+
});
26+
} else {
27+
$routeProvider
28+
.when("/search", {
29+
action: "directory",
30+
})
31+
.when("/myClass", {
32+
action: "myClass",
33+
})
34+
.when("/user-view/:userId", {
35+
action: "viewUser",
36+
})
37+
.when("/:userId", {
38+
action: "viewUser",
39+
})
40+
.when("/group-view/:groupId", {
41+
action: "viewGroup",
42+
})
43+
.otherwise({
44+
redirectTo: "/myClass",
45+
});
46+
}
4747
});
4848

4949
ng.controllers.push(accountController);
5050
ng.controllers.push(classAdminController);
5151
ng.controllers.push(directoryController);
5252
ng.directives.push(adaptiveHeight);
53+
ng.directives.push(intlPhoneInputDirective);

0 commit comments

Comments
 (0)