本文整理汇总了TypeScript中entcore.notify.success方法的典型用法代码示例。如果您正苦于以下问题:TypeScript notify.success方法的具体用法?TypeScript notify.success怎么用?TypeScript notify.success使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类entcore.notify
的用法示例。
在下文中一共展示了notify.success方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: async
const createUserAndAttach = async () => {
const { firstName, lastName, birthDate, type, relatives } = $scope.userCreate.form;
const res = await directoryService.saveUserForClass(classroom.id, {
birthDate,
lastName,
firstName,
childrenIds: relatives && relatives.map(c => c.id),
type
});
notify.success("user.added");
return res;
}
示例2: function
$scope.resetPasswords = async function (user) {
if (!model.me.email) {
notify.error("classAdmin.reset.error");
return;
}
try {
if (user) {
await directoryService.resetPassword([user])
} else {
await directoryService.resetPassword(_selection)
}
notify.success("directory.admin.reset.code.sent")
} catch (e) {
notify.error("directory.admin.reset.code.send.error");
}
}
示例3: async
const sendForUsersWithMail = async () => {
try {
if (_sendingMail) return;
_sendingMail = true;
// send mail
const school = getSchool();
await directoryService.sendMassMailing({
ids: _usersWithMails.map(u => u.id),
structureId: school.id,
type: "mail"
})
notify.success(lang.translate("directory.notify.mailSent"))
} catch (e) {
notify.error(lang.translate("classAdmin.mail.failed"))
} finally {
_sendingMail = false;
}
}
示例4:
.done(function(){
if (prop === 'motto') {
notify.success(lang.translate('userBook.motto.success'));
}
})
示例5: function
$scope.notifyAddUser = function(name) {
notify.success(lang.translate('directory.notify.confirmAddUser') + '</br>"' + name + '"');
};