|
|
@@ -180,7 +180,8 @@ export default function IntegrationsRedirect() {
|
|
|
if (!sessionData) return;
|
|
|
|
|
|
const session = JSON.parse(sessionData);
|
|
|
- const response = await fetch(`${API_URL}/api/phone-numbers?available=true`, {
|
|
|
+ // Fetch all available phone numbers (no country filter for store integration)
|
|
|
+ const response = await fetch(`${API_URL}/api/phone-numbers?available=true&all_countries=true`, {
|
|
|
method: 'GET',
|
|
|
headers: {
|
|
|
'Authorization': `Bearer ${session.session.access_token}`,
|
|
|
@@ -191,6 +192,8 @@ export default function IntegrationsRedirect() {
|
|
|
if (response.ok) {
|
|
|
const data = await response.json();
|
|
|
setPhoneNumbers(data.phone_numbers || []);
|
|
|
+ } else {
|
|
|
+ console.error('Failed to fetch phone numbers:', response.status);
|
|
|
}
|
|
|
} catch (err) {
|
|
|
console.error('Error fetching phone numbers:', err);
|
|
|
@@ -376,8 +379,8 @@ export default function IntegrationsRedirect() {
|
|
|
return (
|
|
|
<div className="min-h-screen flex items-center justify-center bg-slate-900 p-4">
|
|
|
{/* Auth Dialog for non-authenticated users */}
|
|
|
- <Dialog open={showAuthDialog} onOpenChange={setShowAuthDialog}>
|
|
|
- <DialogContent className="bg-slate-800 border-slate-700 max-w-md">
|
|
|
+ <Dialog open={showAuthDialog} onOpenChange={() => {}} modal={true}>
|
|
|
+ <DialogContent className="bg-slate-800 border-slate-700 max-w-md [&>button]:hidden">
|
|
|
<DialogHeader>
|
|
|
<div className="flex items-center justify-center mb-4">
|
|
|
<Store className={`w-12 h-12 ${platform?.color || 'text-cyan-500'}`} />
|
|
|
@@ -410,21 +413,12 @@ export default function IntegrationsRedirect() {
|
|
|
</Button>
|
|
|
</div>
|
|
|
|
|
|
- <DialogFooter className="mt-4">
|
|
|
- <Button
|
|
|
- variant="ghost"
|
|
|
- className="w-full text-slate-400 hover:text-white"
|
|
|
- onClick={() => navigate('/')}
|
|
|
- >
|
|
|
- {t('common.cancel', 'Cancel')}
|
|
|
- </Button>
|
|
|
- </DialogFooter>
|
|
|
</DialogContent>
|
|
|
</Dialog>
|
|
|
|
|
|
{/* Assign Dialog for authenticated users */}
|
|
|
- <Dialog open={showAssignDialog} onOpenChange={setShowAssignDialog}>
|
|
|
- <DialogContent className="bg-slate-800 border-slate-700 max-w-md">
|
|
|
+ <Dialog open={showAssignDialog} onOpenChange={() => {}} modal={true}>
|
|
|
+ <DialogContent className="bg-slate-800 border-slate-700 max-w-md [&>button]:hidden">
|
|
|
<DialogHeader>
|
|
|
<div className="flex items-center justify-center mb-4">
|
|
|
<CheckCircle className={`w-12 h-12 ${platform?.color || 'text-cyan-500'}`} />
|
|
|
@@ -518,20 +512,6 @@ export default function IntegrationsRedirect() {
|
|
|
{t('integrations.oauth.createNewAccount', 'Create a new account instead')}
|
|
|
</Button>
|
|
|
</div>
|
|
|
-
|
|
|
- <DialogFooter className="mt-4">
|
|
|
- <Button
|
|
|
- variant="ghost"
|
|
|
- className="w-full text-slate-400 hover:text-white"
|
|
|
- onClick={() => {
|
|
|
- setShowAssignDialog(false);
|
|
|
- navigate('/webshops');
|
|
|
- }}
|
|
|
- disabled={completing}
|
|
|
- >
|
|
|
- {t('common.cancel', 'Cancel')}
|
|
|
- </Button>
|
|
|
- </DialogFooter>
|
|
|
</DialogContent>
|
|
|
</Dialog>
|
|
|
|