Compare commits
2 Commits
d4736ac096
...
8b2e303059
| Author | SHA1 | Date | |
|---|---|---|---|
| 8b2e303059 | |||
| a05f68d8d6 |
@@ -295,6 +295,13 @@ module.exports = {
|
||||
'@microsoft/spfx/no-require-ensure': 2,
|
||||
}
|
||||
},
|
||||
{
|
||||
// Файлы локализации SPFx (loc/*.js) — это AMD-модули: их подключает
|
||||
// загрузчик страницы через define(), а не бандлер. Без объявления среды
|
||||
// no-undef считает define необъявленной переменной.
|
||||
files: ['**/loc/*.js'],
|
||||
env: { amd: true }
|
||||
},
|
||||
{
|
||||
// For unit tests, we can be a little bit less strict. The settings below revise the
|
||||
// defaults specified in the extended configurations, as well as above.
|
||||
|
||||
@@ -3,21 +3,15 @@
|
||||
"id": "caca4ff9-050c-4643-936c-d0f29a0f9532",
|
||||
"alias": "RequestPortalWebPart",
|
||||
"componentType": "WebPart",
|
||||
|
||||
// The "*" signifies that the version should be taken from the package.json
|
||||
"version": "*",
|
||||
"manifestVersion": 2,
|
||||
|
||||
// If true, the component can only be installed on sites where Custom Script is allowed.
|
||||
// Components that allow authors to embed arbitrary script code should set this to true.
|
||||
// https://support.office.com/en-us/article/Turn-scripting-capabilities-on-or-off-1f2c515f-5d7e-448a-9fd7-835da935584f
|
||||
"requiresCustomScript": false,
|
||||
"supportedHosts": ["SharePointWebPart", "TeamsPersonalApp", "TeamsTab", "SharePointFullPage"],
|
||||
"supportsThemeVariants": true,
|
||||
"supportsFullBleed": true,
|
||||
|
||||
"preconfiguredEntries": [{
|
||||
"groupId": "5c03119e-3074-46fd-976b-c60198311f70", // Advanced
|
||||
"groupId": "5c03119e-3074-46fd-976b-c60198311f70",
|
||||
"group": { "default": "Advanced" },
|
||||
"title": { "default": "request-portal" },
|
||||
"description": { "default": "request-portal description" },
|
||||
|
||||
@@ -65,7 +65,7 @@ export default class RequestPortalWebPart extends BaseClientSideWebPart<IRequest
|
||||
if (!!this.context.sdks.microsoftTeams) { // running in Teams, office.com or Outlook
|
||||
return this.context.sdks.microsoftTeams.teamsJs.app.getContext()
|
||||
.then(context => {
|
||||
let environmentMessage: string = '';
|
||||
let environmentMessage: string;
|
||||
switch (context.app.host.name) {
|
||||
case 'Office': // running in Office
|
||||
environmentMessage = this.context.isServedFromLocalhost ? strings.AppLocalEnvironmentOffice : strings.AppOfficeEnvironment;
|
||||
|
||||
@@ -129,6 +129,7 @@ export class ApprovalListService {
|
||||
toWrite.forEach(({ a, order }, i) => {
|
||||
// void: промис от add() на batched-инстансе нарочно не ждём поштучно —
|
||||
// он разрешится вместе со всеми остальными после execute() ниже.
|
||||
// eslint-disable-next-line no-void -- без void это «висячий» промис, а no-floating-promises здесь уровня error
|
||||
void batchedList.items.add({
|
||||
Title: a.position || a.email,
|
||||
[`${FIELDS.approver}Id`]: approverIds[i],
|
||||
|
||||
Reference in New Issue
Block a user