1
0
forked from baron/baron-sso

userfront: 회원가입 시 기본 개인(Personal) 테넌트 가입, 기업 소속은 별도 문의 이메일 안내 카드로 개편 (#1183)

This commit is contained in:
2026-06-16 16:49:14 +09:00
parent 64d48b9097
commit 2a9ab0ddc5

View File

@@ -3,6 +3,7 @@ import 'dart:async';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:go_router/go_router.dart';
import 'package:url_launcher/url_launcher.dart';
import 'package:userfront/i18n.dart';
import '../../../core/i18n/locale_utils.dart';
import '../../../core/services/auth_proxy_service.dart';
@@ -1788,24 +1789,88 @@ Matters not expressly provided in this Policy are governed by the Company's inte
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
if (_affiliationType == 'AFFILIATE') ...[
const SizedBox(height: 14),
DropdownButtonFormField<String>(
key: ValueKey(_companyCode ?? 'none'),
initialValue: _companyCode,
decoration: InputDecoration(
labelText: tr(
'ui.userfront.signup.profile.company',
const SizedBox(height: 16),
Container(
padding: const EdgeInsets.all(16),
decoration: BoxDecoration(
color: Theme.of(context)
.colorScheme
.primaryContainer
.withValues(alpha: 0.15),
borderRadius: BorderRadius.circular(12),
border: Border.all(
color: Theme.of(context)
.colorScheme
.primary
.withValues(alpha: 0.25),
),
border: const OutlineInputBorder(),
),
items: _tenants.map((t) {
return DropdownMenuItem<String>(
value: t['slug'],
child: Text(t['name'] ?? t['slug']),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.stretch,
children: [
Row(
children: [
Icon(
Icons.business,
color: Theme.of(context)
.colorScheme
.primary,
size: 24,
),
const SizedBox(width: 10),
Expanded(
child: Text(
'기업 소속 가입 안내',
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 15,
color: Theme.of(context)
.colorScheme
.primary,
),
),
),
],
),
const SizedBox(height: 12),
Text(
'기업/가족사 소속 회원은 바로 가입하는 대신 별도 문의를 통해 가입 및 워크스페이스 연동이 진행됩니다.\n\n아래 버튼을 눌러 담당자에게 가입 문의 이메일을 보내거나 baroncs@baroncs.co.kr로 직접 문의해 주시기 바랍니다.',
style: TextStyle(
fontSize: 13,
height: 1.5,
color: _signupInk
.withValues(alpha: 0.8),
),
),
const SizedBox(height: 16),
FilledButton.icon(
onPressed: () async {
final Uri emailUri = Uri(
scheme: 'mailto',
path: 'baroncs@baroncs.co.kr',
query: Uri.encodeFull(
'subject=[Baron SSO] 기업 소속 가입 및 연동 문의',
),
);
}).toList(),
onChanged: (val) =>
setState(() => _companyCode = val),
if (await canLaunchUrl(emailUri)) {
await launchUrl(emailUri);
}
},
icon: const Icon(Icons.mail_outline,
size: 18),
label: const Text('기업 소속 문의하기'),
style: FilledButton.styleFrom(
shape: RoundedRectangleBorder(
borderRadius:
BorderRadius.circular(8),
),
padding: const EdgeInsets.symmetric(
vertical: 12),
),
),
],
),
),
],
],
@@ -1814,24 +1879,19 @@ Matters not expressly provided in this Policy are governed by the Company's inte
],
),
),
if (_affiliationType == 'GENERAL') ...[
const SizedBox(height: 18),
_buildProfileFieldGroup(
title: _affiliationType == 'AFFILIATE'
? tr('ui.userfront.signup.profile.department')
: tr(
title: tr(
'ui.userfront.signup.profile.department_optional',
),
description: _affiliationType == 'AFFILIATE'
? '가족사 사용자는 부서명을 입력해주세요.'
: '선택 입력 항목입니다.',
description: '선택 입력 항목입니다.',
isDesktop: isDesktop,
child: TextFormField(
controller: _deptController,
onChanged: (_) => setState(() {}),
decoration: InputDecoration(
labelText: _affiliationType == 'AFFILIATE'
? tr('ui.userfront.signup.profile.department')
: tr(
labelText: tr(
'ui.userfront.signup.profile.department_optional',
),
border: const OutlineInputBorder(),
@@ -1839,6 +1899,7 @@ Matters not expressly provided in this Policy are governed by the Company's inte
),
),
],
],
),
),
),
@@ -2317,10 +2378,8 @@ Matters not expressly provided in this Policy are governed by the Company's inte
if (_affiliationType == 'GENERAL') {
canGoNext = nameOk;
} else {
// AFFILIATE 필수: 이름 + 가족사 선택 + 부서명
final companyOk = _companyCode != null;
final deptOk = _deptController.text.trim().isNotEmpty;
canGoNext = nameOk && companyOk && deptOk;
// 기업 소속(AFFILIATE)인 경우 직접 가입 대신 문의로 안내하므로 다음 단계 진행을 차단합니다.
canGoNext = false;
}
}