freesoftwarefactory/crm-yii
Composer 安装命令:
composer create-project freesoftwarefactory/crm-yii
包简介
A Micro CRM for a Yii Framework Application
README 文档
README
Setup Instructions:
-
Install mysql tables:
mysql <databasename> < /ruta/al/repo/vendor/freesoftwarefactory/crm/mysql.schema.sql -
Install the Console Commands:
cd /bla/my-app/commands ln -s ../freesoftwarefactory/crm/console/CrmController.php . -
Install the Controller:
cd /bla/my-app/controllers ln -s ../freesoftwarefactory/crm/web/CrmController.php . -
Setup files:
// copy files cp /bla/my-app/vendor/freesoftwarefactory/crm/crm-config.php bla/my-app/config // reflect it in 'components' section config/console.php, config/web.php 'crm' => require(__DIR__.'/crm-config.php'),
Config Crm Fields
Here you define all the crm fields. Copy this file into your config/ path, as:
/your/app/config/crm-config.php
register it in your components section inside web.php and console.php:
'crm' => require(__DIR__.'/crm-config.php'),
Example setup file:
<?php
return [
"class"=>"freesoftwarefactory\crm\Api",
"layouts"=>array(
"default"=>"@crmviews/base", // <-- use this layout
"create"=>"", // or, per view: create,edit,view,find
"edit"=>"", // ...
),
"fields"=>array(
"first_name"=>array(
"label"=>"Nombre", // come on...
"size"=>45, //
"min"=>0, //
"type"=>"text", //
"placeholder"=>"Ingrese el nombre", //
"default"=>"", // default value
"required"=>true, // mark as required
"list"=>1, // used to be showed in find results
"browse"=>1, // see also: crm_field
),
"last_name"=>array(
"label"=>"Apellido",
"size"=>45,
"min"=>0,
"type"=>"text",
"placeholder"=>"Ingrese el apellido",
"list"=>1,
"browse"=>1, // see also: crm_field
),
"primary_email"=>array(
"label"=>"Correo Personal",
"size"=>80,
"min"=>0,
"type"=>"mail",
"placeholder"=>"Ingrese un correo",
"list"=>1,
"browse"=>1, // see also: crm_field
),
"primary_phone"=>array(
"label"=>"Telefono Personal",
"size"=>45,
"min"=>0,
"type"=>"text",
"placeholder"=>"Ingrese un telefono",
),
"notes"=>array(
"label"=>"Notas Adicionales",
"size"=>45,
"min"=>0,
"rows"=>5,
"type"=>"textarea",
"placeholder"=>"Notas adicionales",
),
)
];
Contact Widget
This widget is designed to find/edit/create contacts, it has two modalities: 'finder' or 'browser'.
-
The 'finder' modality helps you pick one contact and select into a existing text input (a hidden input, as an example).
-
The 'browser' modality will present contacts using a 'checkbox' selector.
[html]
<?php
<style>
.crm-form-group {
display: inline-block;
}
</style>
<div class='row'>
<div class='col-md-12'>
<input type='hidden' name='contact_id_receptor' />
<div class='input-group' id='contacts_finder'>
<input id='contact_selector' readonly
type='text' placeholder=''
class='form-control' value='' />
<span class='input-group-btn'>
<button id='contacts_activator'
title='busque o cree un contacto haciendo click aqui'
class='btn btn-primary'>
<span class='glyphicon glyphicon-search'></span>
</button>
<button
title=''
class='btn btn-success' id='submit_contact'>
<span class='glyphicon glyphicon-plus'></span>OK</button>
</span>
</div>
<?=\app\components\CrmFindContactWidget::widget([
'mode'=>'browser', // or 'finder'
'readonly'=>false,
'selector'=>'[name=contact_id_receptor]',
'selector_label'=>'#contact_selector',
'selector_activator'=>'#contacts_activator',
'selector_finder'=>'#contacts_finder',
'crm_field'=>'browse', // show all columns with 'browse' attrib.
]);?>
</div>
</div>
Customize Contact Widget using Events Handlers
The contact widget fires some events to help you take desitions in you own implementation, just add this code snippets:
$( document ).on( 'crm:find:list:updated', { some: 'data'},
function( event, list, keywords, resp ) {
});
$( document ).on( 'crm:form:launch', { some: 'data'},
function( event, widget, current_contact) {
widget.find('.result-list').hide();
});
$( document ).on( 'crm:form:render:contact', { some: 'data'},
function( event, widget, current_contact, response) {
});
API
Use the api methods via:
\Yii::$app->crm
Console Access
Handle all contacts and relationships using a Console:
./yii crm
freesoftwarefactory/crm-yii 适用场景与选型建议
freesoftwarefactory/crm-yii 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 60 次下载、GitHub Stars 达 1, 最近一次更新时间为 2016 年 09 月 05 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 freesoftwarefactory/crm-yii 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 freesoftwarefactory/crm-yii 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 60
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 13
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-09-05