$AMOheader = [
'Content-Type: application/json',
'Authorization: Bearer ' . trim(file_get_contents($AMOtoken))
];
$data = [
[
'entity_id' => (int)$_POST['leads']['status']['0']['id'],
'note_type' => 'common',
'params' => [
'text' => 'Пароль перезаписан...'
]
]
];
$data = [
[
'id' => (int)$_POST['leads']['status']['0']['id'],
'custom_fields_values' => [
[
'field_id' => 1151761,
'values' => [
[
'value' => $OAID
]
]
],
[
'field_id' => 1151755,
'values' => [
[
'value' => $OAPass
]
]
]
],
'status_id' => 65941234
]
];
export const pinia = createPinia()
import {pinia} from "@/.../pinia.js";
app.use(pinia)
import { createI18n } from "vue-i18n";
import en from "./en.json"
import ru from "./ru.json"
import {useSettingsStore} from "@/store/SettingsDataStore";
import {pinia} from "@/.../pinia.js";
const settingsStore = useSettingsStore(pinia);
export default createI18n({
locale: settingsStore.locale,
fallbackLocale: 'ru',
messages: {
en, ru
},
legacy: false,
globalInjection: true
})
/** Привязка файла со счетом к сделке */
if (!empty($this->invoiceFileName)) {
// Загружаем файл счета в amocrm
$file = $this->uploadFile();
$lead = $this->apiClient->leads()->getOne($lead->getId());
$leadCustomFieldsValues = new CustomFieldsValuesCollection();
$leadCustomFieldsValues->add(self::addFile($this->config['app']['lead_file'], $file));
$lead->setCustomFieldsValues($leadCustomFieldsValues);
$this->apiClient->leads()->updateOne($lead);
$file = $this->uploadFile();
$this->apiClient->entityFiles(EntityTypesInterface::LEADS, $lead->getId())->add(
(new FileLinksCollection())
->add(
(new FileLinkModel())
->setFileUuid($file->getUuid())
)
);
}