When creating or editing a staff PIN in the store context, the name field now shows an autocomplete dropdown with the store's team members (loaded from GET /store/team/members). Selecting a member auto-fills name and staff_id (email). The dropdown filters as you type. Only active in store context (where staffApiPrefix is configured). Merchant and admin PIN views are unaffected — merchant has no staffApiPrefix, admin is read-only. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
20 lines
640 B
JavaScript
20 lines
640 B
JavaScript
// app/modules/loyalty/static/store/js/loyalty-pins.js
|
|
// noqa: js-006 - async init pattern is safe, loadData has try/catch
|
|
|
|
const storePinsLog = window.LogConfig.loggers.storePins || window.LogConfig.createLogger('storePins');
|
|
|
|
function storeLoyaltyPins() {
|
|
return loyaltyPinsList({
|
|
apiPrefix: '/store/loyalty',
|
|
staffApiPrefix: '/store',
|
|
showStoreFilter: false,
|
|
showCrud: true,
|
|
currentPage: 'pins',
|
|
});
|
|
}
|
|
|
|
if (!window.LogConfig.loggers.storePins) {
|
|
window.LogConfig.loggers.storePins = window.LogConfig.createLogger('storePins');
|
|
}
|
|
storePinsLog.info('Store loyalty pins module loaded');
|